[ET Trac] [Einstein Toolkit] #1553: Prevent the user defining non-static functions in more than one object file

Einstein Toolkit trac-noreply at einsteintoolkit.org
Mon Mar 3 08:23:44 CST 2014


#1553: Prevent the user defining non-static functions in more than one object file
--------------------------+-------------------------------------------------
  Reporter:  hinder       |       Owner:                     
      Type:  enhancement  |      Status:  new                
  Priority:  minor        |   Milestone:                     
 Component:  Cactus       |     Version:  development version
Resolution:               |    Keywords:                     
--------------------------+-------------------------------------------------

Comment (by eschnett):

 This is a problem because we put thorn functions into libraries, and (by
 default) libraries can contain duplicate definitions. In this case, the
 linker uses the first definition it sees, which depends on the order in
 which we list the thorns when calling the linker.

 We have modifications to the flesh that make Cactus use all functions from
 all thorns all the time. This leads to linker errors for duplicate
 functions. Since this is system-specific, this is not the default. (I am
 unaware of a system where this fails, though.)

 For OS X, you enable this with the options
 {{{
 CACTUSLIBLINKLINE         = -L$(CCTK_LIBDIR) -filelist
 $(CCTK_LIBDIR)/LINKLIST,$(TOP)/build
 BEGIN_WHOLE_ARCHIVE_FLAGS = -L$(CCTK_LIBDIR)   # must not be empty
 END_WHOLE_ARCHIVE_FLAGS   =
 }}}

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1553#comment:1>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list