-
Notifications
You must be signed in to change notification settings - Fork 169
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
Errors compiling minimal example: "undefined reference to pthread_create" and "undefined reference to `dlopen'" (and my fixes) #380
Comments
pthread_create" and "undefined reference to
dlopen'" (and my fixes)
This is on main/nightly right? Likely a dup of #379 |
indeed, nightly branch, commit from May 28th |
Fixed. Thank you for the report. |
I pulled master ("4466bcf main origin/main Update webui_get_best_browser description") and I was having the same error messages when compiling the minimal example, but now I only need to add -STATIC_BUILD_FLAGS = main.c -I"$(INCLUDE_DIR)" -L"$(LIB_DIR)"
-DYN_BUILD_FLAGS = main.c -I"$(INCLUDE_DIR)" -L"$(LIB_DIR)"
+STATIC_BUILD_FLAGS = main.c -Wl,--no-as-needed -ldl -I"$(INCLUDE_DIR)" -L"$(LIB_DIR)"
+DYN_BUILD_FLAGS = main.c -Wl,--no-as-needed -ldl -I"$(INCLUDE_DIR)" -L"$(LIB_DIR)" |
I see, after we added WebView dynamic load feature to WebUI 2.5.0 Beta 1, libdl ( |
Hi,
Compiling webui worked instantly, but compiling the minimal example gave me these errors:
I found a combinaison of characters in the Makefile that makes the compilation succeed and the example run:
-lpthread
is moved last and I added-Wl,--no-as-needed -ldl
(source: first SO answers).minimal example:
./main
runs but takes 100% CPU,./main-dyn
segfaults, both binaries of the text editor run.I am on an oldish system:
Mint 20 LTS (Ubuntu Focal), x64
gcc 9.4.0
kuddos for the work.
The text was updated successfully, but these errors were encountered: