Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Mar 2012 20:39:16 +0100
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        Ports FreeBSD <freebsd-ports@FreeBSD.org>
Subject:   Building a port with math/superlu fails: linking a shared obj library adding archive superlu.a fails
Message-ID:  <4F5CFF64.3020902@zedat.fu-berlin.de>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigB2880957F3EFD8F7A6F1AF20
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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:

=3D=3D
 # __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 =3D 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 =3D DiskImageResourceIsis.cc Equation.cc        \=

                  PolyEquation.cc RPNEquation.cc IsisInterface.cc     \
                  IsisInterfaceFrame.cc IsisInterfaceLineScan.cc      \
                  IsisInterfaceMapFrame.cc IsisInterfaceMapLineScan.cc \
                  IsisAdjustCameraModel.cc

libaspIsisIO_la_LIBADD =3D @MODULE_ISISIO_LIBS@

lib_LTLIBRARIES =3D libaspIsisIO.la

endif

#########################################################################=

# general
#########################################################################=


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

SUBDIRS =3D . tests

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

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

libaspIsisIO_la_LIBADD =3D @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


--------------enigB2880957F3EFD8F7A6F1AF20
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iQEcBAEBAgAGBQJPXP9pAAoJEOgBcD7A/5N8RRMH/R0YRfv65ednPZ4asMR6Dg0+
1qCensSUpc6mA7nS5193HyABqrBezaLYPJadZemcn69bkBGRKCMN++XC0GAYT8Xe
guj8B7xmCFDX0U48N/347vPexQl8Z8+H1XRUwe+9SF93Idk680cbr3erPA+qdG0L
PKzW0eT8Cujoz44nX50CjJDUVU3JA8d3+milDV/j/Zdw3jJ/jta92iCb74Qe6NQU
SgMXnFvFKI5YpMMRtdJb5OC/DCgG6s4PhkSAIMp+7MExdTVAVqX4FqpTRPylCrtv
TWJN8zFsDgEd5Zx1xX9QaxShyb717FPKrBN0F/VOX+CozPx+V0SWUD2GQDqY2fY=
=nEcL
-----END PGP SIGNATURE-----

--------------enigB2880957F3EFD8F7A6F1AF20--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F5CFF64.3020902>