cburstedde / libsc

The "sc" auxiliary library
www.p4est.org/
GNU Lesser General Public License v2.1
36 stars 34 forks source link

Build system fails for externally built subpackages #169

Closed lukasdreyer closed 7 months ago

lukasdreyer commented 8 months ago

Description The build system is not working correctly for us when using the develop branch for packages that are built externally. make[2]: *** No rule to make target '-L/localdata1/drey_lu/t8_clone/t8code/p4est/build_debug/install/lib', needed by 'src/libt8.la'. Stop. My investigation lead me to the following line in sc_package.m4:

  $1_$3_LDADD="-L$$1_$3_LIB -l$4"

that is

  $1_$3_LDADD="$$1_$3_DIR/lib/lib$4.la"

in master. Reverting it to the version in master lead to our build pipeline working again. What was the reason for the change and can we revert it?

To Reproduce Build t8code on the branch update-submodules, with sc and p4est built externally:

git clone  https://github.com/DLR-AMR/t8code.git
cd t8code/
export T8_SRC=$PWD
export MAKEFLAGS="-j V=0"
git checkout update-submodules
git submodule init
git submodule update
./bootstrap 
export SC_DEBUG=$PWD/sc/build_debug
mkdir $SC_DEBUG
cd $SC_DEBUG && ../configure --enable-mpi --enable-debug --prefix=$PWD/install
cd $SC_DEBUG && make $MAKEFLAGS && make install $MAKEFLAGS 
cd $T8_SRC
export P4EST_DEBUG=$PWD/p4est/build_debug
mkdir $P4EST_DEBUG 
cd $P4EST_DEBUG && ../configure --enable-mpi --enable-debug --prefix=$PWD/install --with-sc=$SC_DEBUG/install
cd $P4EST_DEBUG && make $MAKEFLAGS && make $MAKEFLAGS install
cd $T8_SRC
export FLAGS="-Wall -pedantic -O0"
export CONFIG_DEBUG="--enable-debug --enable-mpi --with-sc=$SC_DEBUG/install --with-p4est=$P4EST_DEBUG/install"
mkdir build-debug
cd build-debug/
../configure $CONFIG_DEBUG CFLAGS="$FLAGS" CXXFLAGS="$FLAGS"
make  CFLAGS="$FLAGS -Werror" CXXFLAGS="$FLAGS -Werror" $MAKEFLAGS 

leads to make[2]: *** No rule to make target '-L/localdata1/drey_lu/t8_clone/t8code/p4est/build_debug/install/lib', needed by 'src/libt8.la'. Stop.

Additional information

cburstedde commented 8 months ago

Thanks; were you able to align the t8code with the latest develop branch of p4est, sc?

You're correct in identifying our changes in src/Makefile.am to be breaking.

cburstedde commented 8 months ago

Hi; just asking for the status -- is there anything that we want to do on our end?

cburstedde commented 7 months ago

Hi; just asking for the status -- is there anything that we want to do on our end?

This seems resolved by the t8code developers.