guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Does Guile honor its configuration options and make flags?


From: Jeffrey Walton
Subject: Does Guile honor its configuration options and make flags?
Date: Tue, 24 Oct 2017 10:31:42 -0400

I'm having trouble with some linking. Guile was configured with
--with-pic, and its dependent libraries were built with -fPIC. I'm
building on x86_64, so CFLAGS and CXXFLAGS include "-m64
-march=native".

My build of Readline installed in /usr/local has -fPIC applied. The
same applies to Termcap and Ncurses. I've gone back to my build
records and confirmed the three were built with -fPIC, -m64 (and
friends) and the proper relocation data is available.

However, when Guile links, I get loads of "recompile with -fPIC". A
sample is shown below.

My first question is, is Guile actually honoring --with-pic,
--with-readline-prefix and the flags it was configured with?

My second question is, is Guile using the libraries provided in
/usr/local? Or is it using some other libraries with an arbitrary
configuration?

My third question is, how do I get Guile to __STOP__ hiding output?
`make V=1` does not seem to do it. I can't diagnose a problem I don't
see, and the missing outputs are extremely frustrating.

****************************************

libtool: link: gcc -std=gnu11 -shared  -fPIC -DPIC  .libs/readline.o
-Wl,--whole-archive ../lib/.libs/libgnu.a -Wl,--no-whole-archive
-Wl,-rpath -Wl,/home/jwalton/Build-Scripts/guile-2.2.2/libguile/.libs
-Wl,-rpath -Wl,/usr/local/lib64 -Wl,-rpath -Wl,/usr/local/lib64
-L/usr/local/lib64 -lreadline -lncurses
../libguile/.libs/libguile-2.2.so -lgc -lffi
/usr/local/lib64/libgmp.so /usr/local/lib64/libltdl.so
/usr/local/lib64/libunistring.so /usr/local/lib64/libiconv.so -lcrypt
-ldl -lpthread -lm  -m64 -march=native -m64 -Wl,-rpath
-Wl,/usr/local/lib64 -Wl,--enable-new-dtags   -Wl,-soname
-Wl,guile-readline.so.0 -o .libs/guile-readline.so.0.0.0
/bin/ld: /usr/local/lib64/libncurses.a(lib_termcap.o): relocation
R_X86_64_32S against symbol `_nc_globals' can not be used when making
a shared object; recompile with -fPIC
/bin/ld: /usr/local/lib64/libncurses.a(lib_tparm.o): relocation
R_X86_64_32 against `.rodata' can not be used when making a shared
object; recompile with -fPIC
/bin/ld: /usr/local/lib64/libncurses.a(lib_tputs.o): relocation
R_X86_64_32 against `.rodata' can not be used when making a shared
object; recompile with -fPIC
/bin/ld: /usr/local/lib64/libncurses.a(comp_error.o): relocation
R_X86_64_32 against `.rodata' can not be used when making a shared
object; recompile with -fPIC
/bin/ld: /usr/local/lib64/libncurses.a(lib_baudrate.o): relocation
R_X86_64_32S against `.rodata' can not be used when making a shared
object; recompile with -fPIC

****************************************

Here's part of the script I am using to drive things on my side. All
of the OPT_ array are valid. 30 or so other Autotool projects
configure fine with them. It feels like Guile is just ignoring what I
am telling it to do.

    PKG_CONFIG_PATH="${OPT_PKGCONFIG[*]}" \
    CPPFLAGS="${OPT_CPPFLAGS[*]}" \
    CFLAGS="${OPT_CFLAGS[*]}" CXXFLAGS="${OPT_CXXFLAGS[*]}" \
    LDFLAGS="${OPT_LDFLAGS[*]}" LIBS="${OPT_LIBS[*]}" \
./configure --prefix="$INSTALL_PREFIX" --libdir="$INSTALL_LIBDIR" \
    --enable-shared --enable-static --with-pic \
    --disable-deprecated \
    --with-libgmp-prefix="$INSTALL_PREFIX" \
    --with-libunistring-prefix="$INSTALL_PREFIX" \
    --with-libiconv-prefix="$INSTALL_PREFIX" \
    --with-libltdl-prefix="$INSTALL_PREFIX" \
    --with-readline-prefix="$INSTALL_PREFIX" \
    --with-libintl-prefix="$INSTALL_PREFIX"

if [[ "$?" -ne "0" ]]; then
    echo "Failed to configure Guile"
    [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi

MAKE_FLAGS=("-j" "$MAKE_JOBS" "V=1")
if ! "$MAKE" "address@hidden"
then
    echo "Failed to build Guile"
    [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]