#9833: fatal relocation error with Cliquer library on 64-bit Solaris and
OpenSolaris
------------------------+---------------------------------------------------
   Reporter:  drkirkby  |       Owner:  drkirkby
       Type:  defect    |      Status:  new     
   Priority:  major     |   Milestone:  sage-4.6
  Component:  solaris   |    Keywords:          
     Author:            |    Upstream:  N/A     
   Reviewer:            |      Merged:          
Work_issues:            |  
------------------------+---------------------------------------------------

Comment(by leif):

 This is a general error in how Cliquer is adapted to/built for Sage.

 It is intended as a stand-alone program, and therefore contains
 {{{main()}}}.

 You '''must''' (or should)  '''not''' build [shared] libraries containing
 a {{{main()}}} function.

 Instead, use {{{#ifdef ...}}} and {{{-D...}}} depending on what you build.
 I think Sage should build and install both, the program and a library. (If
 you remove/omit {{{main()}}} for the shared library, the loader problems
 should vanish.)

 {{{
 #!diff
 --- cliquer-1.2.p6/src/Makefile 2010-02-16 05:26:57.000000000 +0100
 +++ cliquer-1.2.p6/patch/Makefile       2010-02-16 05:26:55.000000000
 +0100
 @@ -1,14 +1,29 @@

  ##### Configurable options:

 +# Don't need to set any of these compiler variables. They have already
 been
 +# set when running SAGE_ROOT/local/bin/sage-env as part of installing a
 +# package.
  ## Compiler:
 -CC=gcc
 +# CC=gcc
  #CC=cc

  ## Compiler flags:

  # GCC:  (also -march=pentium etc, for machine-dependent optimizing)
 -CFLAGS=-Wall -O3 -fomit-frame-pointer -funroll-loops
 +# Build in 64-bit mode on Mac OS X with an Intel processor.
 +
 +# Flags for building a dynamically linked shared object.
 +# SAGESOFLAGS=""
 +# ifeq (`uname`, Linux)
 +#      SAGESOFLAGS=-shared -Wl,-soname,libcliquer.so
 +# endif
 +# ifeq (`uname`, Darwin)
 +#      SAGESOFLAGS=-shared -dynamiclib
 +# endif
 +# ifeq (`uname`, SunOS)
 +#      SAGESOFLAGS=-G -Bdynamic
 +# endif

  # GCC w/ debugging:
  #CFLAGS=-Wall -g -DINLINE=
 @@ -36,8 +51,7 @@
         $(CC) $(LDFLAGS) -o $@ testcases.o cliquer.o graph.o reorder.o

  cl: cl.o cliquer.o graph.o reorder.o
 -       $(CC) $(LDFLAGS) -o $@ cl.o cliquer.o graph.o reorder.o
 -
 +       $(CC) $(LDFLAGS) $(SAGESOFLAGS) -o libcliquer.so cl.o cliquer.o
 graph.o reorder.o

  cl.o testcases.o cliquer.o graph.o reorder.o: cliquer.h set.h graph.h
 misc.h reorder.h Makefile cliquerconf.h

 }}}
 Note the changes made to the {{{cl}}} target (which is [the name of] the
 stand-alone program).

 This package really needs work (but there's - besides others - already a
 ticket (#9871) for an upstream update as well). The files in {{{src/}}}
 are not even vanilla, but contain weird changes in order to use Cliquer as
 a library from within Sage.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9833#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to