FLTK logo

STR #2962

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]

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
Created By:ossman
Assigned To:greg.ercolano
Fix Version:1.3-current (SVN: v9920)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Name/Time/Date Filename/Size  
#1 ossman
05:20 May 16, 2013

Trouble Report Comments:

Name/Time/Date Text  
#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 ..

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.


Return to Bugs & Features ]


Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.