Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: osqp link error #2314

Closed
daohu527 opened this issue Jun 26, 2024 · 1 comment
Closed

[Bug]: osqp link error #2314

daohu527 opened this issue Jun 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@daohu527
Copy link
Contributor

daohu527 commented Jun 26, 2024

What happened?

I add osqp deps in MODULE.bazel like below

bazel_dep(name = "osqp", version = "0.6.3")

Then in BUILD file

cc_test(
    name = "box2d_test",
    size = "small",
    srcs = ["box2d_test.cc"],
    deps = [
        ":geometry",
        "@com_google_googletest//:gtest_main",
        "@osqp",
    ],
)

when build below is the libosqp.so-2.params

bazel-out/k8-fastbuild/bin/_solib_k8/libexternal_Ssuitesparse~_Slibamd.so: error: undefined reference to 'SuiteSparse_config_printf_func_get'
bazel-out/k8-fastbuild/bin/_solib_k8/libexternal_Ssuitesparse~_Slibamd.so: error: undefined reference to 'SuiteSparse_malloc'
bazel-out/k8-fastbuild/bin/_solib_k8/libexternal_Ssuitesparse~_Slibamd.so: error: undefined reference to 'SuiteSparse_free'
bazel-out/k8-fastbuild/bin/_solib_k8/libexternal_Sosqp~_Slibosqp.so: error: undefined reference to 'QDLDL_etree'
bazel-out/k8-fastbuild/bin/_solib_k8/libexternal_Sosqp~_Slibosqp.so: error: undefined reference to 'QDLDL_factor'
bazel-out/k8-fastbuild/bin/_solib_k8/libexternal_Sosqp~_Slibosqp.so: error: undefined reference to 'amd_order'
bazel-out/k8-fastbuild/bin/_solib_k8/libexternal_Sosqp~_Slibosqp.so: error: undefined reference to 'QDLDL_solve'

below is the

-shared
-o
bazel-out/k8-fastbuild/bin/external/osqp~/libosqp.so
-Wl,-S
-fuse-ld=gold
-B/usr/bin
-Wl,-no-as-needed
-Wl,-z,relro,-z,now
-pass-exit-codes
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/qdldl_interface.pic.o
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/auxil.pic.o
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/error.pic.o
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/lin_alg.pic.o
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/osqp.pic.o
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/proj.pic.o
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/scaling.pic.o
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/util.pic.o
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/kkt.pic.o
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/cs.pic.o
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/polish.pic.o
bazel-out/k8-fastbuild/bin/external/osqp~/_objs/osqp/lin_sys.pic.o
-Wl,--push-state,-as-needed
-lstdc++
-Wl,--pop-state
-Wl,--push-state,-as-needed
-lm
-Wl,--pop-state

Version

Development (host) and target OS/architectures:

Output of bazel --version: 7.2.0

Version of relevant rules from the WORKSPACE or MODULE.bazel file:

bazel_dep(name = "osqp", version = "0.6.3")

Language(s) and/or frameworks involved:
c++

How to reproduce

No response

Any other information?

No response

@daohu527 daohu527 added the bug Something isn't working label Jun 26, 2024
@Wyverald
Copy link
Member

Looks like this was fixed in #2419.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants