Comments (5)
Please remove "-Wl,--no-undefined" from your custom link flags.
These undefined references aren't a problem, because a program using waylandpp will be linking against wayland-client++ anyway.
from waylandpp.
This comes from the global rpm %cmake
macro:
...
-DCMAKE_BUILD_TYPE=RelWithDebInfo \\\
-DCMAKE_C_FLAGS="${CFLAGS:-%optflags} -DNDEBUG" \\\
-DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags} -DNDEBUG" \\\
-DCMAKE_Fortran_FLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}} -DNDEBUG" \\\
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed" \\\
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\
...
from waylandpp.
Does f478bb7 fix it for you?
from waylandpp.
Yes, thanks.
from waylandpp.
I still have build issues even with the newest commits (7c72bbd). I can, however, build Kodi from source on Archlinux if I downgrade waylandpp to version 0.2.5. Here is the CMakeError.log file:
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/neal/git/kodi-git/src/xbmc/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_f7da0/fast && /usr/bin/make -f CMakeFiles/cmTC_f7da0.dir/build.make CMakeFiles/cmTC_f7da0.dir/build
make[1]: Entering directory '/home/neal/git/kodi-git/src/xbmc/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_f7da0.dir/src.c.o
/usr/lib/ccache/bin/cc -march=native -O2 -pipe -fstack-protector-strong -fno-plt -DWL_EGL_PLATFORM=1 -DPLATFORM_SETTINGS_FILE=wayland.xml -Wall -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_f7da0.dir/src.c.o -c /home/neal/git/kodi-git/src/xbmc/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_f7da0
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f7da0.dir/link.txt --verbose=1
/usr/lib/ccache/bin/cc -march=native -O2 -pipe -fstack-protector-strong -fno-plt -DWL_EGL_PLATFORM=1 -DPLATFORM_SETTINGS_FILE=wayland.xml -Wall -DCMAKE_HAVE_LIBC_PTHREAD -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fuse-ld=gold CMakeFiles/cmTC_f7da0.dir/src.c.o -o cmTC_f7da0
CMakeFiles/cmTC_f7da0.dir/src.c.o:src.c:function main: error: undefined reference to 'pthread_create'
CMakeFiles/cmTC_f7da0.dir/src.c.o:src.c:function main: error: undefined reference to 'pthread_detach'
CMakeFiles/cmTC_f7da0.dir/src.c.o:src.c:function main: error: undefined reference to 'pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_f7da0.dir/build.make:87: cmTC_f7da0] Error 1
make[1]: Leaving directory '/home/neal/git/kodi-git/src/xbmc/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_f7da0/fast] Error 2
Source file was:
#include <pthread.h>
void* test_func(void* data)
{
return data;
}
int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);
return 0;
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/neal/git/kodi-git/src/xbmc/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_c1eb5/fast && /usr/bin/make -f CMakeFiles/cmTC_c1eb5.dir/build.make CMakeFiles/cmTC_c1eb5.dir/build
make[1]: Entering directory '/home/neal/git/kodi-git/src/xbmc/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c1eb5.dir/CheckFunctionExists.c.o
/usr/lib/ccache/bin/cc -march=native -O2 -pipe -fstack-protector-strong -fno-plt -DWL_EGL_PLATFORM=1 -DPLATFORM_SETTINGS_FILE=wayland.xml -Wall -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_c1eb5.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.15/Modules/CheckFunctionExists.c
Linking C executable cmTC_c1eb5
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c1eb5.dir/link.txt --verbose=1
/usr/lib/ccache/bin/cc -march=native -O2 -pipe -fstack-protector-strong -fno-plt -DWL_EGL_PLATFORM=1 -DPLATFORM_SETTINGS_FILE=wayland.xml -Wall -DCHECK_FUNCTION_EXISTS=pthread_create -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fuse-ld=gold CMakeFiles/cmTC_c1eb5.dir/CheckFunctionExists.c.o -o cmTC_c1eb5 -lpthreads
/usr/bin/ld.gold: error: cannot find -lpthreads
CMakeFiles/cmTC_c1eb5.dir/CheckFunctionExists.c.o:CheckFunctionExists.c:function main: error: undefined reference to 'pthread_create'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_c1eb5.dir/build.make:87: cmTC_c1eb5] Error 1
make[1]: Leaving directory '/home/neal/git/kodi-git/src/xbmc/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_c1eb5/fast] Error 2
from waylandpp.
Related Issues (20)
- Cross-compilation HOT 6
- Should have SONAME HOT 1
- Use a different build system HOT 2
- Allow specifying libdir in SCons HOT 2
- CMake on Debian stable HOT 4
- Issues with the weston-desktop-shell protocol HOT 12
- Issues with gtk and the wlroots layer-shell protocol HOT 1
- Allow to build against a system installed pugixml HOT 1
- Allow building static libraries HOT 2
- Server headers/sources generating HOT 3
- cmake minimum version ? HOT 1
- Release new version HOT 1
- 0.2.9 broke ABI HOT 2
- Please update wayland.xml protocol HOT 2
- Examples for `wayland::detail::any`? HOT 1
- Something is wrong with `resource_t` in `wayland-server++`
- Enhancement: short interface declaration in generated `${protocol_name}-procotol.cpp`
- Confused about usage - custom objects for a shell
- What happens if libwayland-client.so and libwaylandpp-client.so are compiled each using a different version of wayland.xml file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from waylandpp.