Dynamically linked build fails
Bug #1923107 reported by
Andrés Barrantes Silman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cairo-Dock Core |
Triaged
|
Medium
|
Fabounet |
Bug Description
When building I need to limit the build jobs to 1, else it fails with undefined references. Either way, at the end of the build ld fails to link. I assume it has something to do with libgldi, probably something missing in the CMakeLists. I attached the build log where you can see the build commands.
To post a comment you must log in.
Hi, frame-pointer -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack- protector- strong -funwind-tables -fasynchronous- unwind- tables -fstack- clash-protectio n -Werror=return-type -flto=auto -g -DNDEBUG -O2 -g -DNDEBUG -flto=auto -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -shared -Wl,-soname, libcd-Help. so -o libcd-Help.so CMakeFiles/ cd-Help. dir/applet- init.c. o CMakeFiles/ cd-Help. dir/applet- config. c.o CMakeFiles/ cd-Help. dir/applet- notifications. c.o CMakeFiles/ cd-Help. dir/applet- tips-dialog. c.o CMakeFiles/ cd-Help. dir/applet- composite. c.o -lgthread-2.0 -lglib-2.0 -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lcairo -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -lxml2 -lGLU -lGL -lcurl -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lrsvg-2 -lm -ldbus-glib-1 -ldbus-1 -lxml2 -lGLU -lGL -lcurl -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject
looking at the build log, the link looks like this:
/usr/bin/cc -fPIC -fomit-
The --no-undefined option passed to the linker is probably what causes the problem.
The thing is, plug-ins don't need to link with libgldi, as they are dlopened by it at run-time.
I wonder where all those options come from ?
Anyway, I think this option should not be used in this case, and you can remove it by adding "-z undefs" in your LDFLAGS.