[ET Trac] [Einstein Toolkit] #1173: ExternalLibraries build environment problems

Einstein Toolkit trac-noreply at einsteintoolkit.org
Mon Nov 12 09:52:10 CST 2012


#1173: ExternalLibraries build environment problems
-----------------------------------+----------------------------------------
 Reporter:  hinder                 |       Owner:     
     Type:  defect                 |      Status:  new
 Priority:  major                  |   Milestone:     
Component:  EinsteinToolkit thorn  |     Version:     
 Keywords:  zlib hwloc             |  
-----------------------------------+----------------------------------------
 After updating to the latest hwloc in ExternalLibraries, I am running into
 trouble building it.  The error is

 {{{
 ../libtool: line 6000: cd: NO_BUILD/lib: No such file or directory
 libtool: link: cannot determine absolute directory name of `NO_BUILD/lib'
 }}}

 and I believe that this is caused by my having

 {{{
 ZLIB_DIR = NO_BUILD
 }}}

 in my optionlist.  This causes the following variables to be set:

 {{{
 ZLIB_INC_DIRS=NO_BUILD/include
 ZLIB_LIB_DIRS=NO_BUILD/lib
 ZLIB_DIR=NO_BUILD
 }}}

 and hwloc now has the following references to these variables in its
 configure.sh script:

 {{{
         export HWLOC_PCI_CFLAGS="$(echo $(for dir in ${PCIUTILS_INC_DIRS}
 ${ZLIB_INC_DIRS}; do echo $dir; done | sed -e 's/^/-I/'))"
         export HWLOC_PCI_LIBS="$(echo $(for dir in ${PCIUTILS_LIB_DIRS}
 ${ZLIB_LIB_DIRS}; do echo $dir; done | sed -e 's/^/-L/') $(for dir in
 ${PCIUTILS_LIBS} ${ZLIB_LIBS}; do echo $dir; done | sed -e 's/^/-l/'))"
 }}}

 The zlib configure.sh script has:

 {{{
 # Set options
 if [ "${ZLIB_DIR}" = '/usr' -o "${ZLIB_DIR}" = '/usr/local' ]; then
     ZLIB_INC_DIRS=''
     ZLIB_LIB_DIRS=''
 else
     ZLIB_INC_DIRS="${ZLIB_DIR}/include"
     ZLIB_LIB_DIRS="${ZLIB_DIR}/lib"
 fi
 }}}

 I am setting ZLIB_DIR to NO_BUILD and I am not setting ZLIB_INC_DIRS or
 ZLIB_LIB_DIRS because the linker can find the zlib library without any
 additional options, but it is not installed in /usr or /usr/local.  It is
 in fact in:
 {{{
 /usr/lib/x86_64-linux-gnu/libz.a
 /usr/lib/x86_64-linux-gnu/libz.so
 }}}
 I think eventually the correct solution, as Erik has suggested in the
 past, is to attempt to build a small program which uses the library to
 find out whether any extra options are needed.  In this case, this would
 succeed, and no variables would need to be set.

 As a simpler short-term solution, would it be correct to change the
 conditional to

 {{{
 if [ "${ZLIB_DIR}" = '/usr' -o "${ZLIB_DIR}" = '/usr/local' -o
 "${ZLIB_DIR}" = 'NO_BUILD' ]; then
 }}}
 ?

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1173>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list