LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Compiling trouble with gcc when using the libtool flag (https://www.linuxquestions.org/questions/linux-software-2/compiling-trouble-with-gcc-when-using-the-libtool-flag-941719/)

kraileth 04-25-2012 02:41 PM

Compiling trouble with gcc when using the libtool flag
 
Hi everybody!

For those who are interested: This thread is a follow-up to this one.

I'm on an Alpine Linux 2.3 system and trying to create several binary packages that are not yet available (I want to use LXDE on a clean system without dev-libs installed).

Some packages built just fine but with at least two I'm having problems with libtool. If I just try to build the packages, everything works well in the beginning: configuration and even compiling the source with make. But on make install I'm told that some *.la files were found and that I'd have to enable the 'libtool' flag.

I do so by adding "-libtool" to CFLAGS via export. If I do so after configure, it is obviously ignored since I once again get the message to set the flag during make install. Now if I export it before configure, the later fails:

Quote:

configure: error: C compiler cannot create executables
See 'config.log' for more details.
The log file is here:

Code:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by menu-cache configure 0.3.2, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = alpine
uname -m = i686
uname -r = 3.0.24-grsec
uname -s = Linux
uname -v = #1-Alpine SMP Tue Mar 13 15:04:36 UTC 2012

/usr/bin/uname -p = unknown
/bin/uname -X    = unknown

/bin/arch              = unknown
/usr/bin/arch -k      = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine          = unknown
/usr/bin/oslevel      = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2267: checking for a BSD-compatible install
configure:2335: result: /usr/bin/install -c
configure:2346: checking whether build environment is sane
configure:2396: result: yes
configure:2537: checking for a thread-safe mkdir -p
configure:2576: result: ./install-sh -c -d
configure:2589: checking for gawk
configure:2619: result: no
configure:2589: checking for mawk
configure:2619: result: no
configure:2589: checking for nawk
configure:2619: result: no
configure:2589: checking for awk
configure:2605: found /usr/bin/awk
configure:2616: result: awk
configure:2627: checking whether make sets $(MAKE)
configure:2649: result: yes
configure:2733: checking whether to enable maintainer-specific portions of Makefiles
configure:2742: result: no
configure:2768: checking for style of include used by make
configure:2796: result: GNU
configure:2866: checking for gcc
configure:2882: found /usr/bin/gcc
configure:2893: result: gcc
configure:3122: checking for C compiler version
configure:3131: gcc --version >&5
gcc (Alpine 4.6.2-r2) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3142: $? = 0
configure:3131: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i486-alpine-linux-uclibc/4.6.2/lto-wrapper
Target: i486-alpine-linux-uclibc
Configured with: /home/buildozer/aports/main/gcc/src/gcc-4.6.2/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=i486-alpine-linux-uclibc --host=i486-alpine-linux-uclibc --target=i486-alpine-linux-uclibc --with-pkgversion='Alpine 4.6.2-r2' --disable-altivec --disable-checking --disable-fixed-point --disable-libssp --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --enable-__cxa_atexit --enable-cld --enable-esp --enable-cloog-backend --enable-languages=c,c++,objc,java,go --enable-shared --enable-target-optspace --enable-tls --enable-threads --with-dynamic-linker=ld-uClibc.so.0.9.32 --with-dynamic-linker-prefix=/lib --with-system-zlib --without-system-libunwind
Thread model: posix
gcc version 4.6.2 (Alpine 4.6.2-r2)
configure:3142: $? = 0
configure:3131: gcc -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3142: $? = 1
configure:3131: gcc -qversion >&5
gcc: error: unrecognized option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3142: $? = 1
configure:3164: checking for C compiler default output file name
configure:3186: gcc -Os -fomit-frame-pointer -libtool -Os -fomit-frame-pointer -Wl,--as-needed conftest.c  >&5
/usr/lib/gcc/i486-alpine-linux-uclibc/4.6.2/../../../../i486-alpine-linux-uclibc/bin/ld: cannot find -libtool
collect2: ld returned 1 exit status
configure:3190: $? = 1
configure:3227: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "menu-cache"
| #define PACKAGE_TARNAME "menu-cache"
| #define PACKAGE_VERSION "0.3.2"
| #define PACKAGE_STRING "menu-cache 0.3.2"
| #define PACKAGE_BUGREPORT "http://lxde.org/"
| #define PACKAGE_URL ""
| #define PACKAGE "menu-cache"
| #define VERSION "0.3.2"
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main ()
| {
| FILE *f = fopen ("conftest.out", "w");
|  return ferror (f) || fclose (f) != 0;
|
|  ;
|  return 0;
| }
configure:3233: error: in `/home/kraileth/aports/neu/menu-cache/src/menu-cache-0.3.2':
configure:3237: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=''
ac_cv_env_CC_value=''
ac_cv_env_CFLAGS_set='set'
ac_cv_env_CFLAGS_value='-Os -fomit-frame-pointer -libtool'
ac_cv_env_CPPFLAGS_set='set'
ac_cv_env_CPPFLAGS_value='-Os -fomit-frame-pointer'
ac_cv_env_CPP_set=''
ac_cv_env_CPP_value=''
ac_cv_env_GLIB_CFLAGS_set=''
ac_cv_env_GLIB_CFLAGS_value=''
ac_cv_env_GLIB_LIBS_set=''
ac_cv_env_GLIB_LIBS_value=''
ac_cv_env_LDFLAGS_set='set'
ac_cv_env_LDFLAGS_value='-Wl,--as-needed'
ac_cv_env_LIBS_set=''
ac_cv_env_LIBS_value=''
ac_cv_env_PKG_CONFIG_set=''
ac_cv_env_PKG_CONFIG_value=''
ac_cv_env_build_alias_set=''
ac_cv_env_build_alias_value=''
ac_cv_env_host_alias_set=''
ac_cv_env_host_alias_value=''
ac_cv_env_target_alias_set=''
ac_cv_env_target_alias_value=''
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK='awk'
ac_cv_prog_ac_ct_CC='gcc'
ac_cv_prog_make_make_set='yes'

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/kraileth/aports/neu/menu-cache/src/menu-cache-0.3.2/missing --run aclocal-1.11'
ACLOCAL_AMFLAGS=''
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /home/kraileth/aports/neu/menu-cache/src/menu-cache-0.3.2/missing --run tar'
AR=''
AUTOCONF='${SHELL} /home/kraileth/aports/neu/menu-cache/src/menu-cache-0.3.2/missing --run autoconf'
AUTOHEADER='${SHELL} /home/kraileth/aports/neu/menu-cache/src/menu-cache-0.3.2/missing --run autoheader'
AUTOMAKE='${SHELL} /home/kraileth/aports/neu/menu-cache/src/menu-cache-0.3.2/missing --run automake-1.11'
AWK='awk'
CC='gcc'
CCDEPMODE=''
CFLAGS='-Os -fomit-frame-pointer -libtool'
CPP=''
CPPFLAGS='-Os -fomit-frame-pointer'
CYGPATH_W='echo'
DEBUG_CFLAGS=''
DEFS=''
DEPDIR='.deps'
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GLIB_CFLAGS=''
GLIB_LIBS=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS='-Wl,--as-needed'
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /home/kraileth/aports/neu/menu-cache/src/menu-cache-0.3.2/missing --run makeinfo'
MKDIR_P='./install-sh -c -d'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='menu-cache'
PACKAGE_BUGREPORT='http://lxde.org/'
PACKAGE_NAME='menu-cache'
PACKAGE_STRING='menu-cache 0.3.2'
PACKAGE_TARNAME='menu-cache'
PACKAGE_URL=''
PACKAGE_VERSION='0.3.2'
PATH_SEPARATOR=':'
PKG_CONFIG=''
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/ash'
STRIP=''
VERSION='0.3.2'
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/kraileth/aports/neu/menu-cache/src/menu-cache-0.3.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
lt_ECHO='echo'
mandir='${datarootdir}/man'
mkdir_p='$(top_builddir)/./install-sh -c -d'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "menu-cache"
#define PACKAGE_TARNAME "menu-cache"
#define PACKAGE_VERSION "0.3.2"
#define PACKAGE_STRING "menu-cache 0.3.2"
#define PACKAGE_BUGREPORT "http://lxde.org/"
#define PACKAGE_URL ""
#define PACKAGE "menu-cache"
#define VERSION "0.3.2"

configure: exit 77

I have no idea why both configure and make work without the flag which is however needed for make install but configure's testing of the compiler fails when it is set.

Any help would be very welcome.

hydraMax 04-25-2012 09:25 PM

Well, I think the problem is that gcc has no -libtool flag. As far as I can tell, ld doesn't either. From your log, it seem evident that gcc is choking on it:

Code:

configure:3186: gcc -Os -fomit-frame-pointer -libtool -Os -fomit-frame-pointer -Wl,--as-needed conftest.c  >&5
/usr/lib/gcc/i486-alpine-linux-uclibc/4.6.2/../../../../i486-alpine-linux-uclibc/bin/ld: cannot find -libtool
collect2: ld returned 1 exit status
configure:3190: $? = 1
configure:3227: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "menu-cache"
| #define PACKAGE_TARNAME "menu-cache"
| #define PACKAGE_VERSION "0.3.2"
| #define PACKAGE_STRING "menu-cache 0.3.2"
| #define PACKAGE_BUGREPORT "http://lxde.org/"
| #define PACKAGE_URL ""
| #define PACKAGE "menu-cache"
| #define VERSION "0.3.2"
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main ()
| {
| FILE *f = fopen ("conftest.out", "w");
|  return ferror (f) || fclose (f) != 0;
|
|  ;
|  return 0;
| }
configure:3233: error: in `/home/kraileth/aports/neu/menu-cache/src/menu-cache-0.3.2':
configure:3237: error: C compiler cannot create executables

If I'm interpreting this correctly, GCC is getting the -libtool flag, trying to create a test executable, and then choking because ld can't find the "ibtool" library anywhere.

I think you need to go back to fontconfig and figure out what it is they really meant by that. Maybe it is some kind of ./configure option...?


All times are GMT -5. The time now is 10:25 PM.