rabbibotton / clog

CLOG - The Common Lisp Omnificent GUI
Other
1.52k stars 106 forks source link

CLOG Frame ./make-linux undefined reference to symbol 'dlclose@@GLIBC_2.2.5' #362

Closed vindarel closed 3 months ago

vindarel commented 3 months ago

Hi, I'm trying to compile CLOG Frame:

$ ./make-linux
/usr/bin/ld: /tmp/ccgb62VL.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Any idea?

Thanks


I am on:

OS: Linux Mint 20 LTS x86_64 (Ubuntu Focal) Kernel: 5.4.0-176-generic gcc 9.4 GLIBC 2.31

rabbibotton commented 3 months ago

So if you look at make-linux you will see that it relies on pkg-config for settings to C++

So seems something missing or misconfigured, did install the prerequisite packages mentioned in README.md in clog/clogframe?

vindarel commented 3 months ago

yes I have those

g++ is already the newest version (4:9.3.0-1ubuntu2).
libgtk-3-dev is already the newest version (3.24.20-0ubuntu1.1).
libgtk-3-dev set to manually installed.
libwebkit2gtk-4.0-dev is already the newest version (2.38.6-0ubuntu0.20.04.1).

Here's another output:

$ pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0
-pthread -I/usr/include/webkitgtk-4.0 -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/webkitgtk-4.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lwebkit2gtk-4.0 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lsoup-2.4 -lgio-2.0 -ljavascriptcoregtk-4.0 -lgobject-2.0 -lglib-2.0

Which made me think of a similar issue I saw recently.

This fixes it for me, I add -ldl:

c++ clogframe.cpp -ldl `pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0` -o clogframe

I can run make-linux, compile clogframe, run the snake and the builder :rocket:

rabbibotton commented 3 months ago

I have added -ldl to make-linux after reading what it is, every lisp app plays the games that warrant having it.