| [ Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]
STR #2962
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | sub-libraries incorrectly link against static libfltk.a |
Version: | 1.3-current |
Created By: | ossman |
Assigned To: | greg.ercolano |
Fix Version: | 1.3-current (SVN: v9920) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | ossman 05:20 May 16, 2013 |
| The CMake build system links e.g. libfltk_images.so with libfltk.a which pulls in non PIC object in that shared library.
The attached patch fixes that and makes sure that all the libfltk_*.so files link with libfltk.so, rather than libfltk.a. | |
|
#2 | greg.ercolano 06:15 May 16, 2013 |
| Would like to accept the patch, but would like to see the errors and error replication commands so that I can verify the problem, and then verify the patch fixes the problem. | |
|
#3 | greg.ercolano 06:48 May 16, 2013 |
| OK, nevermind, maybe this is what I was looking for..
Using these commands to build fltk with cmake:
mkdir unix; cd unix; cmake -D OPTION_BUILD_SHARED_LIBS=on .. make
Without the patch, the above dies with:
[ 71%] Building CXX object src/CMakeFiles/fltk_forms_SHARED.dir/forms_timer.cxx.o Linking CXX shared library ../lib/libfltk_forms.so /usr/bin/ld: ../lib/libfltk.a(Fl.cxx.o): relocation R_X86_64_32S against `.bss' can not be used when making a shared object; recompile with -fPIC ../lib/libfltk.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [lib/libfltk_forms.so.1.3] Error 1 make[1]: *** [src/CMakeFiles/fltk_forms_SHARED.dir/all] Error 2 make: *** [all] Error 2
..and with patch applied, builds without errors.
Fixed in SVN (r9920), marked active, holding for replies before closing. | |
|
#4 | ossman 00:37 May 17, 2013 |
| That was one possible issue, yes. The other was a problem with GNU binutils for solaris, which create bad .so files when you link non-PIC stuff into .so files. | |
|
#5 | greg.ercolano 11:35 May 22, 2013 |
| Fixed in Subversion repository.
Closing.. | |
[ Return to Bugs & Features ]
|
| |