FLTK logo

STR #2919

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

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:Build Files
Summary:The build system fails to build against needed libraries
Version:1.3-feature
Created By:RedDwarf
Assigned To:AlbrechtS
Fix Version:1.3.4
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 RedDwarf
05:00 Jan 17, 2013
fltk-1.3.2-underlinking.patch
3k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 RedDwarf
05:00 Jan 17, 2013
The attached patch makes the linker create all the DT_NEEDED entries that each library requires.

It additionally adds to DSOCOMMAND:

* "-Wl,--as-needed" so no unneeded DT_NEEDED entries are created
* "-Wl,--no-undefined" so an error is reported if a new library is ever needed and you forgot to link against it

Notice that the \$(LDLIBS) in DSOCOMMAND has no effect since. From GNU ld man page: "The linker will search an archive only once, at the location where it is specified on the command line. If the archive defines a symbol which was undefined in some object which appeared before the archive on the command line, the linker will include the appropriate file(s) from the archive. *****However, an undefined symbol in an object appearing later on the command line will not cause the linker to search the archive again *****."

Apparently the last part is not always enforced. But it is when using -Wl,--as-needed (and users can use it even if it's not there by default).
 
 
#2 cand
07:27 Aug 21, 2014
I've applied the Makefile parts. The linker commands cannot just be unconditionally added, as neither is widely supported by older GNU ld or linkers from other vendors.  
 
#3 AlbrechtS
07:39 Aug 08, 2016
Fixed in Subversion repository.

There are four parts in this request (thanks for the patch, BTW.):

(1) Makefile: done by Lauri (cand).

(2) Linker flag "-Wl,--no-undefined": added with compatibility test some time ago.

(3) Linker flag "-Wl,--as-needed": will not be added. Please file another STR if you believe that this should still be added.

(4) configure: same changes as in configure.in, because configure is a generated file. No need to change.

So everything except (3) is done now. Please file another STR if you believe that this should still be added.

Closing this STR now.
 
     

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