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
Error when trying to compile with cmake #152
Comments
Thank you for reporting this issue. I'll fix it later this day. |
This should now be fixed (see 9c49cea). Background information: The CMake script located in the With 9c49cea, the shared libraries are now linked against all dependent libs. Only for the static libraries one needs to now which other libraries must be linked into the executable. I introduced the CMake variables Note: This replaces the CMake variable Please let me know if this fixes your issue. |
I'm a bit confuse how to apply the flag. Like this?
|
You don't need to use |
So I actually don't have to add anything?
|
Yes, it shouldn't be necessary to add further options because in 9c49cea I added the
This is unexpected. You still get the error that |
I got this error:
This is the spec file for cmake for builiding tinypline: https://build.opensuse.org/package/view_file/home:andythe_great/tinyspline/tinyspline.spec?expand=1 This is the full error log: https://build.opensuse.org/package/live_build_log/home:andythe_great/tinyspline/openSUSE_Tumbleweed/x86_64 I recently trigger the building service, so it is trying to build a package at the moment. |
Did you try to compile the libraries without additional tools, i.e. running the following commands: wget https://github.com/msteinbeck/tinyspline/archive/snapshot.tar.gz
tar xf snapshot.tar.gz
cd tinyspline-snapshot
mkdir build
cd build
cmake ..
cmake --build . You should get the following output: > ls lib
libtinyspline.a libtinyspline.so* libtinysplinecpp.a libtinysplinecpp.so* ldd shows that the > ldd lib/libtinyspline.so
linux-vdso.so.1 (0x00007fff3afc9000)
libm.so.6 => /lib64/libm.so.6 (0x00007fe18f751000)
libc.so.6 => /lib64/libc.so.6 (0x00007fe18f388000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe18fc70000)
> ldd lib/libtinysplinecpp.so
linux-vdso.so.1 (0x00007ffec13a5000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f37ea79b000)
libm.so.6 => /lib64/libm.so.6 (0x00007f37ea492000)
libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f37ea27b000)
libc.so.6 => /lib64/libc.so.6 (0x00007f37e9eb2000)
/lib64/ld-linux-x86-64.so.2 (0x00007f37ead36000) |
I tried building on my machine and it indeed work, I will try asking the OBS dev. |
I posted the question here. By the way, how can I uninstalled the compiled tinyspline with normal cmake that I follow in your instruction? |
I suspect OBS might change some cmake flags that cause it to failed. Some of the flags I have found when OBS was compiling are.
|
CMake has no built-in uninstall target. However, you'll find the installed files in |
I'll close this issue because the actual error has been fixed. Don't hesitate to reopen it if necessary. |
When I switch to compiling with make to cmake I encounter an error.
It is complaining about undefined reference to
sqrt' and
pow'I found that I have to add link flag -lm, which told it to use math library.
https://stackoverflow.com/questions/8671366/undefined-reference-to-pow-and-floor
This is what the flags currently look like.
But I don't think
is the correct way to do it. How do I properly do this?
But I still could not get it to compile.
Full spec file here: https://build.opensuse.org/package/view_file/home:andythe_great/tinyspline/tinyspline.spec?expand=1
Full error log here: https://build.opensuse.org/package/live_build_log/home:andythe_great/tinyspline/openSUSE_Tumbleweed/x86_64
PS: About the unversioned library, lets see if cmake will report such problem when I can get tinyspline to compile.
Thanks.
The text was updated successfully, but these errors were encountered: