* Does Guile honor its configuration options and make flags?
@ 2017-10-24 14:31 Jeffrey Walton
2017-10-24 15:50 ` Jeffrey Walton
0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey Walton @ 2017-10-24 14:31 UTC (permalink / raw)
To: guile-devel
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" "${MAKE_FLAGS[@]}"
then
echo "Failed to build Guile"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Does Guile honor its configuration options and make flags?
2017-10-24 14:31 Does Guile honor its configuration options and make flags? Jeffrey Walton
@ 2017-10-24 15:50 ` Jeffrey Walton
0 siblings, 0 replies; 2+ messages in thread
From: Jeffrey Walton @ 2017-10-24 15:50 UTC (permalink / raw)
To: guile-devel
On Tue, Oct 24, 2017 at 10:31 AM, Jeffrey Walton <noloader@gmail.com> wrote:
> 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".
> ...
> 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" "${MAKE_FLAGS[@]}"
> then
> echo "Failed to build Guile"
> [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
> fi
Here are the values being used for the arrays:
PKGCONFIG: /usr/local/lib64/pkgconfig
CPPFLAGS: -I/usr/local/include -DNDEBUG
CFLAGS: -m64 -march=native
CXXFLAGS: -m64 -march=native
LDFLAGS: -m64 -Wl,-rpath,/usr/local/lib64 -L/usr/local/lib64
-Wl,--enable-new-dtags
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-24 15:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 14:31 Does Guile honor its configuration options and make flags? Jeffrey Walton
2017-10-24 15:50 ` Jeffrey Walton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).