FLTK logo

STR #2977

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 #2977

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:Linker Issues During CMake Builds on Linux and OS X
Version:1.3.2
Created By:jamiesnape
Assigned To:AlbrechtS
Fix Version:1.3.3 (SVN: v10042)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 jamiesnape
17:43 Sep 06, 2013
fltk-1.3.patch
2k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 jamiesnape
17:43 Sep 06, 2013
Two linker issues related to CMake builds.


1. Linker issue on Linux (Ubuntu 13.04, gcc 4.7.3, cmake 2.8.10.1):

$ svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
$ mkdir fltk-1.3-static
$ cd fltk-1.3-shared
$ cmake ../fltk-1.3
$ make

Linking CXX executable ../bin/fluid
/usr/bin/ld: ../lib/libfltk.a(Fl_x.cxx.o): undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlsym@@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libdl.so.2 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libdl.so.2: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [bin/fluid] Error 1
make[1]: *** [fluid/CMakeFiles/fluid.dir/all] Error 2
make: *** [all] Error 2


2. Shared library linker issue on OS X (v10.8.4, clang 3.3, cmake 2.8.11.2):

$ svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
$ mkdir fltk-1.3-shared
$ cd fltk-1.3-shared
$ cmake -DOPTION_BUILD_SHARED_LIBS=ON ../fltk-1.3
$ make

Linking CXX shared library ../lib/libfltk.dylib
Undefined symbols for architecture x86_64:
  "_CFAbsoluteTimeGetCurrent", referenced from:
      Fl::add_timeout(double, void (*)(void*), void*) in Fl_cocoa.mm.o
      Fl::repeat_timeout(double, void (*)(void*), void*) in Fl_cocoa.mm.o
      ...
ld: symbol(s) not found for architecture x86_64


Attached is a patch (against FLTK 1.3.x svn r9965) that fixes the linker issues. To test on Linux or OS X:

$ svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
$ patch -d fltk-1.3 -p1 < fltk-1.3.patch
$ mkdir fltk-1.3-static
$ cd fltk-1.3-static
$ cmake ../fltk-1.3
$ make
$ cd ..
$ mkdir fltk-1.3-shared
$ cd fltk-1.3-shared
$ cmake -DOPTION_BUILD_SHARED_LIBS=ON ../fltk-1.3
$ make
 
 
#2 jamiesnape
17:51 Sep 06, 2013
Typo in 1. above. Corrected text is:

$ svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
$ mkdir fltk-1.3-static
$ cd fltk-1.3-static
$ cmake ../fltk-1.3
$ make
 
 
#3 AlbrechtS
08:44 Jan 03, 2014
Fixed in Subversion repository.

Thanks for the exact description and the patch. I could duplicate the bug by executing your instructions literally and fix it by applying your patch.
 
     

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'.