| [ Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]
STR #3011
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 2 - Specific to an operating system |
Subsystem: | Build Files |
Summary: | Building FLTK using CMake under Linux does not specify all needed dependencies |
Version: | 1.3.2 |
Created By: | jlp2 |
Assigned To: | AlbrechtS |
Fix Version: | 1.3.4 (SVN: v10556) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | jlp2 14:27 Nov 30, 2013 |
| Building FLTK using CMake with GCC (>= 4.8 ?) under Linux is missing the linking to libdl for fluid and the examples. Also the LDLIBS in the fltk-config output is missing this dependency as well as the dependency to libfontconfig. I attached a .diff file that shows the changes I made to fix that. | |
|
#2 | jlp2 07:51 Jan 04, 2014 |
| I found a similar bug report #2977 and fix (http://fltk.org/str.php?L2977). Maybe it is better to apply that fix first and then only a few changes from the patch I posted (cmake_link_dl_and_config_output.diff) are needed to fix the remaining build/linking errors. I attached a new updated .diff file (that is to be applied after the patch from #2977). | |
|
#3 | AlbrechtS 16:58 Feb 01, 2014 |
| See also STR #3045. http://www.fltk.org/str.php?L3045 | |
|
#4 | mjsurette 17:33 Feb 01, 2014 |
| After reading this STR I checked and my Arch Linux g++ is at version 4.8.2 which is the likely cause for the failure. It works for me now at svn r10091. -ldl is definitely in the link command for fluid according to my build log. It may be a good idea for the OP to recheck at the current version. | |
|
#5 | jlp2 05:08 Feb 02, 2014 |
| Yes, thanks, you're right, that problem is solved in the latest SVN version. But LDLIBS in the created fltk-config file is still missing the dependency to libfontconfig. Also IMAGELIBS and STATICIMAGELIBS in that file are not set. | |
|
#6 | ianmacarthur 16:07 Sep 04, 2014 |
| Is this still failing?
Or can we close this one? | |
|
#7 | jlp2 04:29 Sep 19, 2014 |
| 1. Linking works with the current SVN. That bug is fixed. 2. LDLIBS (and IMAGELIBS and STATICIMAGELIBS) in fltk-config (which is created during configuration) still misses libraries (like ld) when using CMake. The link commands are not missing when using autogen.sh/configure. | |
|
#8 | AlbrechtS 09:51 Feb 06, 2015 |
| Fixed in Subversion repository.
Thanks for the patch, and sorry for the long delay.
I had to modify the patches because the CMake files had been changed meanwhile.
I also did not apply the last three hunks of your patch because I believe that we don't need this in the current version:
In file CMake/resources.cmake we call:
find_library(LIB_jpeg jpeg) find_library(LIB_png png) find_library(LIB_zlib z)
... to find the system libraries. If this didn't succeed we don't need to include and use the Find* modules, because the libraries are not available anyway, unless they are installed in some non-standard locations where the Find* modules would find them (but not find_library). /IF/ we needed this, then we'd also have to move more code (finding library symbols etc.) from resources.cmake to options.cmake or vice versa.
Note: I believe that this version (svn r 10556) still has some issues with building local image libs and static linking, but this may be addressed later.
Please confirm if this update solves your issues so we can close this STR. Thanks. | |
[ Return to Bugs & Features ]
|
| |