Adding LDFLAGS options break configure check for openpty.
Serge Blais
saarge at gmail.com
Fri Aug 3 23:48:49 WST 2007
I was able to cross build and run the original 0.49 package just fine.
I want to add my own authentication scheme that I put in a library.
So here is an extract from the build script:
LDFLAGS="-L$MY_LIB_DIR -lmyown"
./configure \
--target=powerpc-linux \
--host=powerpc-linux \
--build=i386-pc-linux-gnu \
--prefix="/usr" \
--disable-shadow \
--disable-lastlog \
--disable-utmp \
--disable-utmpx \
--disable-wtmp \
--disable-wtmpx \
--disable-pututline \
--disable-pututxline \
--disable-nls \
--disable-zlib
The only thing new from the original build was the LDFLAGS line...
>From conf.log,here is the failing test that worked fine before adding
the LDFLAGS:
configure:4448: powerpc-linux-gcc -o conftest -D_REENTRANT -Os
-fomit-frame-pointer -pipe -mcpu=860 conftest.c -lutil
-lcrypt -L/home/sblais/dev/trunk/lib -lmyown >&5
/tmp/ccbdxThZ.o: In function `main':
conftest.c:(.text+0xc): undefined reference to `openpty'
collect2: ld returned 1 exit status
configure:4454: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define _FILE_OFFSET_BITS 64
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define DISABLE_ZLIB
| #define DISABLE_PAM
| /* end confdefs.h. */
|
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
| builtin and then its argument prototype would still apply. */
| char openpty ();
| int
| main ()
| {
| openpty ();
| ;
| return 0;
| }
configure:4482: result: no
Note from this output that I tried changing the configure script to
force LDFLAGS to be included at the end of the compile line instead of
somewhere in the middle.
So it would seem that using -L confuses the cross compiler somehow.
Any ideas?
More information about the Dropbear
mailing list