Git Product home page Git Product logo

Comments (6)

tkoeppe avatar tkoeppe commented on May 22, 2024

Can you try adding -lm to the relevant linkopts?

from lab.

nburn42 avatar nburn42 commented on May 22, 2024

Thanks that helped some.

This command now works.

lab$ bazel run :random_agent --define headless=false -- \
               --length=10000 --width=640 --height=480

But this command results in an error.

lab$ bazel run :game -- --level_script tests/demo_map

What I did.
I added -lm to bspc as below, which resulted in the following error.

I tried both

linkopts = ["-pthread", "-lm"],

and

linkopts = ["-lm", "-pthread"],

with bazel cleans.

Thanks

cc_binary(
    name = "bspc",
    srcs = glob([
        CODE_DIR + "/botlib/*.h",
        CODE_DIR + "/qcommon/*.h",
    ]) + [
        CODE_DIR + "/botlib/be_aas_bspq3.c",
        CODE_DIR + "/botlib/be_aas_cluster.c",

        . . .

       "-DQDECL=",
        "-pthread",
    ],
    linkopts = ["-pthread", "-lm"],
    visibility = ["//deepmind/level_generation:__subpackages__"],
    deps = ["@zlib_archive//:zlib"],
)

ERROR: /home/nburn42/Projects/deeprobotics/lab/BUILD:899:1: Linking of rule '//:game' failed: namespace-sandbox failed: error executing command /home/nburn42/.cache/bazel/_bazel_nburn42/8ac04bba4272ff63a5f54d73f1af83e1/lab/_bin/namespace-sandbox ... (remaining 19 argument(s) skipped).
/usr/bin/ld: bazel-out/local-fastbuild/bin/libgame_lib_sdl.a(cl_input.pic.o): undefined reference to symbol 'powf@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Target //:game failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 193.349s, Critical Path: 178.77s
ERROR: Build failed. Not running target.

from lab.

tkoeppe avatar tkoeppe commented on May 22, 2024

Interesting. Can you remove the linker script from the DSO build rule? We were trying to isolate the DSO as much as possible, since we don't have a lot of control over all the external names in it, but it may be interfering here. Alternatively, try adding -lm also to the DSO build rule.

from lab.

nburn42 avatar nburn42 commented on May 22, 2024

Sorry about the delay.

I found that linking the math library into :game fixed my second issue.
It fixed the problems on both ubuntu 16.04 and 14.04.

All the bazel commands on the instructions now work.
I submitted a pull request with the change.

Thanks for the help.

from lab.

tkoeppe avatar tkoeppe commented on May 22, 2024

We will make a change similar to the one proposed in #12 in the future, which should address this. Thanks for raising!

from lab.

tkoeppe avatar tkoeppe commented on May 22, 2024

Fixed by d6b1afc.

from lab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.