From: Jeffrey Walton <noloader@gmail.com>
To: guile-devel@gnu.org
Subject: Does Guile honor its configuration options and make flags?
Date: Tue, 24 Oct 2017 10:31:42 -0400 [thread overview]
Message-ID: <CAH8yC8=pqb+rcw2Zwbmi170P6h2+yRpCDM7dcSX1GqeYUivNzQ@mail.gmail.com> (raw)
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
next reply other threads:[~2017-10-24 14:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-24 14:31 Jeffrey Walton [this message]
2017-10-24 15:50 ` Does Guile honor its configuration options and make flags? Jeffrey Walton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH8yC8=pqb+rcw2Zwbmi170P6h2+yRpCDM7dcSX1GqeYUivNzQ@mail.gmail.com' \
--to=noloader@gmail.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).