I'm about to build a port of the AMES stereopipeline on FreeBSD.
Regrettably, a portion of the sources expect to have superlu's library
and this library is added as a shared object dependency in IsisIO.

As expected, compiling fails with the error

[...]
 IsisInterfaceMapLineScan.cc:92:11: warning: variable 'lon_lat_radius'
set but not used [-Wunused-but-set-variable]
  CXX    IsisAdjustCameraModel.lo
  CXXLD  libaspIsisIO.la
/usr/local/bin/ld: /usr/local/lib/libsuperlu.a(dgssvx.o): relocation
R_X86_64_32 against `.rodata.str1.1' can not be used when making a
shared object; recompile with -fPIC
/usr/local/lib/libsuperlu.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
*** [libaspIsisIO.la] Error code 1
[...]

Well, the portion in the GNU automake Makefile.am controlling the build
of the library in IsisIO looks like this:

==
 # __BEGIN_LICENSE__
# Copyright (C) 2006-2011 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__


#########################################################################
# sources
#########################################################################

if MAKE_MODULE_ISISIO

include_HEADERS = BaseEquation.h Equation.h PolyEquation.h            \
                  RPNEquation.h DiskImageResourceIsis.h               \
                  IsisCameraModel.h            \
                  IsisInterface.h IsisInterfaceFrame.h                \
                  IsisInterfaceLineScan.h IsisInterfaceMapFrame.h     \
                  IsisInterfaceMapLineScan.h IsisAdjustCameraModel.h

libaspIsisIO_la_SOURCES = DiskImageResourceIsis.cc Equation.cc        \
                  PolyEquation.cc RPNEquation.cc IsisInterface.cc     \
                  IsisInterfaceFrame.cc IsisInterfaceLineScan.cc      \
                  IsisInterfaceMapFrame.cc IsisInterfaceMapLineScan.cc \
                  IsisAdjustCameraModel.cc

libaspIsisIO_la_LIBADD = @MODULE_ISISIO_LIBS@

lib_LTLIBRARIES = libaspIsisIO.la

endif

#########################################################################
# general
#########################################################################

AM_CPPFLAGS = @ASP_CPPFLAGS@
AM_LDFLAGS = @ASP_LDFLAGS@ -version-info @LIBTOOL_VERSION@

SUBDIRS = . tests

includedir = $(prefix)/include/asp/IsisIO

include $(top_srcdir)/config/rules.mak
==

libaspIsisIO_la_LIBADD = @MODULE_ISISIO_LIBS@ seems the bad place
causing the error, since MODULE_ISISIO_LIBS is expanded containing
-lsuperlu, but the "lib" is an archive /usr/local/lib/superlu.a.

Well, I didn't check how the thing called Linux is welding together this
library and what they do by compiling the AMES Stereo Pipeline.

Well, contact me by MAIL (do not subscribe this list!), if you have
suggestions or tips and want to share with me.

Regards,
Oliver

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to