libevent 1.4.14b compile error

Share your compiler knowledge

Moderators: Joyce, Laura, Eminent-Admin

libevent 1.4.14b compile error

Postby MartinHerrman » 16 Jan 2011, 23:27

Using toolchain 4.3-154, because with 4.3-51 I seem to hit a bug in the toolchain (GOT-something error while linking?).

During 'make' I get the following error:

/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: BFD (Sourcery G++ Lite 4.3-154) 2.19.51.20090205 assertion fail /scratch/clm/2009q1-linux-lite/obj/binutils-src-4.3-154-mips-linux-gnu-i686-pc-linux-gnu/bfd/elfxx-mips.c:3121
/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: BFD (Sourcery G++ Lite 4.3-154) 2.19.51.20090205 assertion fail /scratch/clm/2009q1-linux-lite/obj/binutils-src-4.3-154-mips-linux-gnu-i686-pc-linux-gnu/bfd/elfxx-mips.c:3117
/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: BFD (Sourcery G++ Lite 4.3-154) 2.19.51.20090205 assertion fail /scratch/clm/2009q1-linux-lite/obj/binutils-src-4.3-154-mips-linux-gnu-i686-pc-linux-gnu/bfd/elfxx-mips.c:3121
collect2: ld returned 1 exit status
make[2]: *** [libevent.la] Error 1
make[2]: Leaving directory `/root/EM7075/workdir/libevent-1.4.14b-stable'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/root/EM7075/workdir/libevent-1.4.14b-stable'
make: *** [install] Error 2

During 'configure':

checking for link... link -dump -symbols
configure: WARNING: using cross tools not prefixed with host triplet
checking the name lister (link -dump -symbols) interface... BSD nm
(..)
checking command to parse link -dump -symbols output from /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc object... failed

My script is:

martindesktop libevent # cat compile_libevent.sh
#!/bin/sh

# Set variables
export CFLAGS="-EL -Os"
export CXXFLAGS="-EL -Os"
export CC="/opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc"
export CXX="/opt/Sourcery_G++_Lite/bin/mips-linux-gnu-g++"
export PATH=/opt/Sourcery_G++_Lite/bin:$PATH
export AR="/opt/Sourcery_G++_Lite/bin/mips-linux-gnu-ar"
export LDFLAGS=" -s -Xlinker -rpath /lib -Xlinker -rpath-link /opt/Sourcery_G++_Lite/lib/gcc/mips-linux-gnu/4.3.3/el"
export STRIP="/opt/Sourcery_G++_Lite/bin/mips-linux-gnu-strip"
export DESTDIR="/root/EM7075/result/libevent"
export RANLIB="/opt/Sourcery_G++_Lite/bin/mips-linux-gnu-ranlib"
export AS="/opt/Sourcery_G++_Lite/bin/mips-linux-gnu-as"
export LD="/opt/Sourcery_G++_Lite/bin/mips-linux-gnu-ld"

# Cleanup previous compilations
rm -rf /root/EM7075/result/libevent
rm -rf /root/EM7075/workdir/libevent*

cd /root/EM7075/workdir
wget http://www.monkey.org/~provos/libevent- ... ble.tar.gz
tar -zxvf libevent-1.4.14b-stable.tar.gz
cd libevent-1.4.14b-stable
./configure --prefix=$DESTDIR --host=i686-pc-linux-gnu --build=mips-linux-gnu --target=mips-linux-gnu
#make
#make install

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

It was created by configure, which was
generated by GNU Autoconf 2.65. Invocation command line was

$ ./configure --prefix=/root/EM7075/result/libevent --host=i686-pc-linux-gnu --build=mips-linux-gnu --target=mips-linux-gnu

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

hostname = martindesktop
uname -m = x86_64
uname -r = 2.6.37
uname -s = Linux
uname -v = #1 SMP Sat Jan 8 21:00:31 CET 2011

/usr/bin/uname -p = Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz
/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: /opt/Sourcery_G++_Lite/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /opt/bin
PATH: /usr/x86_64-pc-linux-gnu/gcc-bin/4.4.4


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

configure:2569: checking for a BSD-compatible install
configure:2637: result: /usr/bin/install -c
configure:2648: checking whether build environment is sane
configure:2698: result: yes
configure:2747: checking for i686-pc-linux-gnu-strip
configure:2774: result: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-strip
configure:2839: checking for a thread-safe mkdir -p
configure:2878: result: /bin/mkdir -p
configure:2891: checking for gawk
configure:2907: found /usr/bin/gawk
configure:2918: result: gawk
configure:2929: checking whether make sets $(MAKE)
configure:2951: result: yes
configure:3038: checking build system type
configure:3052: result: mips-unknown-linux-gnu
configure:3072: checking host system type
configure:3085: result: i686-pc-linux-gnu
configure:3122: checking for i686-pc-linux-gnu-gcc
configure:3149: result: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc
configure:3418: checking for C compiler version
configure:3427: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc --version >&5
mips-linux-gnu-gcc (Sourcery G++ Lite 4.3-154) 4.3.3
Copyright (C) 2008 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:3438: $? = 0
configure:3427: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -v >&5
Using built-in specs.
Target: mips-linux-gnu
Configured with: /scratch/clm/2009q1-linux-lite/src/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=mips-linux-gnu --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-arch=mips32r2 --with-float=hard --enable-mips-nonpic --enable-extra-sgxxlite-multilibs --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 4.3-154' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/mips-linux-gnu/libc --with-build-sysroot=/scratch/clm/2009q1-linux-lite/install/mips-linux-gnu/libc --with-gmp=/scratch/clm/2009q1-linux-lite/obj/host-libs-4.3-154-mips-linux-gnu-i686-pc-linux-gnu/usr --with-mpfr=/scratch/clm/2009q1-linux-lite/obj/host-libs-4.3-154-mips-linux-gnu-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/clm/2009q1-linux-lite/install/mips-linux-gnu/bin --with-build-time-tools=/scratch/clm/2009q1-linux-lite/install/mips-linux-gnu/bin
Thread model: posix
gcc version 4.3.3 (Sourcery G++ Lite 4.3-154)
configure:3438: $? = 0
configure:3427: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -V >&5
mips-linux-gnu-gcc: '-V' option must have argument
configure:3438: $? = 1
configure:3427: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -qversion >&5
mips-linux-gnu-gcc: unrecognized option '-qversion'
mips-linux-gnu-gcc: no input files
configure:3438: $? = 1
configure:3458: checking whether the C compiler works
configure:3480: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -EL -Os -s -Xlinker -rpath /lib -Xlinker -rpath-link /opt/Sourcery_G++_Lite/lib/gcc/mips-linux-gnu/4.3.3/el conftest.c >&5
configure:3484: $? = 0
configure:3533: result: yes
configure:3536: checking for C compiler default output file name
configure:3538: result: a.out
configure:3544: checking for suffix of executables
configure:3551: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -o conftest -EL -Os -s -Xlinker -rpath /lib -Xlinker -rpath-link /opt/Sourcery_G++_Lite/lib/gcc/mips-linux-gnu/4.3.3/el conftest.c >&5
configure:3555: $? = 0
configure:3577: result:
configure:3599: checking whether we are cross compiling
configure:3637: result: yes
configure:3642: checking for suffix of object files
configure:3664: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os conftest.c >&5
configure:3668: $? = 0
configure:3689: result: o
configure:3693: checking whether we are using the GNU C compiler
configure:3712: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os conftest.c >&5
configure:3712: $? = 0
configure:3721: result: yes
configure:3730: checking whether /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc accepts -g
configure:3750: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -g conftest.c >&5
configure:3750: $? = 0
configure:3791: result: yes
configure:3808: checking for /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc option to accept ISO C89
configure:3872: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os conftest.c >&5
configure:3872: $? = 0
configure:3885: result: none needed
configure:3916: checking for style of include used by make
configure:3944: result: GNU
configure:3969: checking dependency style of /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc
configure:4079: result: gcc3
configure:4095: checking whether ln -s works
configure:4099: result: yes
configure:4113: checking how to run the C preprocessor
configure:4144: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -E conftest.c
configure:4144: $? = 0
configure:4158: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -E conftest.c
conftest.c:12:28: error: ac_nonexistent.h: No such file or directory
configure:4158: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "libevent"
| #define VERSION "1.4.14b-stable"
| #define NUMERIC_VERSION 0x01040e00
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:4183: result: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -E
configure:4203: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -E conftest.c
configure:4203: $? = 0
configure:4217: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -E conftest.c
conftest.c:12:28: error: ac_nonexistent.h: No such file or directory
configure:4217: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "libevent"
| #define VERSION "1.4.14b-stable"
| #define NUMERIC_VERSION 0x01040e00
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:4246: checking for grep that handles long lines and -e
configure:4304: result: /bin/grep
configure:4309: checking for egrep
configure:4371: result: /bin/grep -E
configure:4377: checking whether /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc needs -traditional
configure:4411: result: no
configure:4425: checking whether we need extra flags to make libc reentrant
configure:4439: result: no
configure:4475: checking for a sed that does not truncate output
configure:4539: result: /bin/sed
configure:4557: checking for fgrep
configure:4619: result: /bin/grep -F
configure:4654: checking for ld used by /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc
configure:4721: result: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-ld
configure:4728: checking if the linker (/opt/Sourcery_G++_Lite/bin/mips-linux-gnu-ld) is GNU ld
configure:4743: result: yes
configure:4755: checking for BSD- or MS-compatible name lister (nm)
configure:4804: result: no
configure:4815: checking for i686-pc-linux-gnu-dumpbin
configure:4845: result: no
configure:4815: checking for i686-pc-linux-gnu-link
configure:4845: result: no
configure:4859: checking for dumpbin
configure:4889: result: no
configure:4859: checking for link
configure:4875: found /usr/bin/link
configure:4886: result: link -dump -symbols
configure:4902: WARNING: using cross tools not prefixed with host triplet
configure:4922: checking the name lister (link -dump -symbols) interface
configure:4929: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:4932: link -dump -symbols "conftest.o"
link: invalid option -- 'd'
Try `link --help' for more information.
configure:4935: output
configure:4942: result: BSD nm
configure:4946: checking the maximum length of command line arguments
configure:5066: result: 1572864
configure:5083: checking whether the shell understands some XSI constructs
configure:5093: result: yes
configure:5097: checking whether the shell understands "+="
configure:5103: result: yes
configure:5138: checking for /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-ld option to reload object files
configure:5145: result: -r
configure:5174: checking for i686-pc-linux-gnu-objdump
configure:5204: result: no
configure:5214: checking for objdump
configure:5230: found /usr/bin/objdump
configure:5241: result: objdump
configure:5273: checking how to recognize dependent libraries
configure:5469: result: pass_all
configure:5489: checking for i686-pc-linux-gnu-ar
configure:5516: result: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-ar
configure:5594: checking for i686-pc-linux-gnu-strip
configure:5621: result: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-strip
configure:5693: checking for i686-pc-linux-gnu-ranlib
configure:5720: result: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-ranlib
configure:5850: checking command to parse link -dump -symbols output from /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc object
configure:5968: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:5971: $? = 0
configure:5975: link -dump -symbols conftest.o \| sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' \> conftest.nm
link: invalid option -- 'd'
Try `link --help' for more information.
configure:5978: $? = 0
cannot run sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'
configure:5968: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:5971: $? = 0
configure:5975: link -dump -symbols conftest.o \| sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' \> conftest.nm
link: invalid option -- 'd'
Try `link --help' for more information.
configure:5978: $? = 0
cannot run sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p'
configure:6070: result: failed
configure:6876: checking for ANSI C header files
configure:6896: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:6896: $? = 0
configure:6980: result: yes
configure:6993: checking for sys/types.h
configure:6993: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:6993: $? = 0
configure:6993: result: yes
configure:6993: checking for sys/stat.h
configure:6993: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:6993: $? = 0
configure:6993: result: yes
configure:6993: checking for stdlib.h
configure:6993: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:6993: $? = 0
configure:6993: result: yes
configure:6993: checking for string.h
configure:6993: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:6993: $? = 0
configure:6993: result: yes
configure:6993: checking for memory.h
configure:6993: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:6993: $? = 0
configure:6993: result: yes
configure:6993: checking for strings.h
configure:6993: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:6993: $? = 0
configure:6993: result: yes
configure:6993: checking for inttypes.h
configure:6993: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:6993: $? = 0
configure:6993: result: yes
configure:6993: checking for stdint.h
configure:6993: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:6993: $? = 0
configure:6993: result: yes
configure:6993: checking for unistd.h
configure:6993: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:6993: $? = 0
configure:6993: result: yes
configure:7008: checking for dlfcn.h
configure:7008: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:7008: $? = 0
configure:7008: result: yes
configure:7192: checking for objdir
configure:7207: result: .libs
configure:7499: checking if /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc supports -fno-rtti -fno-exceptions
configure:7517: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing -fno-rtti -fno-exceptions conftest.c >&5
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
configure:7521: $? = 0
configure:7534: result: no
configure:7554: checking for /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc option to produce PIC
configure:7826: result: -fPIC -DPIC
configure:7838: checking if /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc PIC flag -fPIC -DPIC works
configure:7856: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing -fPIC -DPIC -DPIC conftest.c >&5
configure:7860: $? = 0
configure:7873: result: yes
configure:7897: checking if /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc static flag -static works
configure:7925: result: yes
configure:7940: checking if /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc supports -c -o file.o
configure:7961: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing -o out/conftest2.o conftest.c >&5
configure:7965: $? = 0
configure:7987: result: yes
configure:7995: checking if /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc supports -c -o file.o
configure:8042: result: yes
configure:8075: checking whether the /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc linker (/opt/Sourcery_G++_Lite/bin/mips-linux-gnu-ld) supports shared libraries
configure:9061: result: yes
configure:9098: checking whether -lc should be explicitly linked in
configure:9103: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:9106: $? = 0
configure:9121: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -shared conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /bin/grep -lc \>/dev/null 2\>\&1
configure:9124: $? = 0
configure:9136: result: no
configure:9300: checking dynamic linker characteristics
configure:9733: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -o conftest -EL -Os -Wall -fno-strict-aliasing -s -Xlinker -rpath /lib -Xlinker -rpath-link /opt/Sourcery_G++_Lite/lib/gcc/mips-linux-gnu/4.3.3/el -Wl,-rpath -Wl,/foo conftest.c >&5
configure:9733: $? = 0
(...)

All help is very welcome :-)
User avatar
MartinHerrman
Forum Supporter
 
Posts: 99
Joined: 08 May 2010, 11:24

Re: libevent 1.4.14b compile error

Postby Alex » 17 Jan 2011, 11:51

Lots of info, but not the correct info, i can't see the error leading up to libevent LD failure.
Did you compile any dependancies that libevent uses?
Forum rules: viewtopic.php?t=4
Using Mediainfo: viewtopic.php?t=1110
Telnet: viewtopic.php?t=1873
Alex
Forum Goddess
 
Posts: 1799
Joined: 12 Nov 2009, 13:05

Re: libevent 1.4.14b compile error

Postby MartinHerrman » 17 Jan 2011, 13:43

Alex, thanks for your quick reply.

I am not aware of any dependencies, so I didn't compile anything else before. Does libevent require some other libraries?

Where can I find the information you need? I thought the main problem was already visible during ./configure, so that's why I posted that.

configure:4859: checking for link
configure:4875: found /usr/bin/link
configure:4886: result: link -dump -symbols
configure:4902: WARNING: using cross tools not prefixed with host triplet
configure:4922: checking the name lister (link -dump -symbols) interface
configure:4929: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -c -EL -Os -Wall -fno-strict-aliasing conftest.c >&5
configure:4932: link -dump -symbols "conftest.o"
link: invalid option -- 'd'
Try `link --help' for more information.
User avatar
MartinHerrman
Forum Supporter
 
Posts: 99
Joined: 08 May 2010, 11:24

Re: libevent 1.4.14b compile error

Postby Alex » 17 Jan 2011, 15:25

Normally, from my experience, before the LD or linking, a whole bag of errors and .o files is spit out. that's what i was looking for..

Now you copy paste the exact point where an error is during configure. This does not mean, that it is the exact cause of your error.

I don't know if libevent needs any other stuff, that's up to you to find out as you're the one compiling it.

Anyway, the error is pretty clean, you are using /usr/bin/link and it doesn't support -dump option.
This is not part of the EM7075 open-source toolchain or code supplied by us, it's part of your linux flavour :)

I would still need to see the compiler output before this point:
Code: Select all
/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: BFD (Sourcery G++ Lite 4.3-154) 2.19.51.20090205 assertion fail /scratch/clm/2009q1-linux-lite/obj/binutils-src-4.3-154-mips-linux-gnu-i686-pc-linux-gnu/bfd/elfxx-mips.c:3121
/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: BFD (Sourcery G++ Lite 4.3-154) 2.19.51.20090205 assertion fail /scratch/clm/2009q1-linux-lite/obj/binutils-src-4.3-154-mips-linux-gnu-i686-pc-linux-gnu/bfd/elfxx-mips.c:3117
/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: BFD (Sourcery G++ Lite 4.3-154) 2.19.51.20090205 assertion fail /scratch/clm/2009q1-linux-lite/obj/binutils-src-4.3-154-mips-linux-gnu-i686-pc-linux-gnu/bfd/elfxx-mips.c:3121
collect2: ld returned 1 exit status
Forum rules: viewtopic.php?t=4
Using Mediainfo: viewtopic.php?t=1110
Telnet: viewtopic.php?t=1873
Alex
Forum Goddess
 
Posts: 1799
Joined: 12 Nov 2009, 13:05

Re: libevent 1.4.14b compile error

Postby MartinHerrman » 17 Jan 2011, 16:37

Thanks again. I'm at work now, so not able to get the information, it has to wait until tonight.

My host operating system is Gentoo Linux. I just found on google that link is part of the coreutils package:

http://www.gnu.org/software/coreutils/m ... invocation

I don't know which version should be used and which version I'm running. But let's first look into the compile error :-)
User avatar
MartinHerrman
Forum Supporter
 
Posts: 99
Joined: 08 May 2010, 11:24

Re: libevent 1.4.14b compile error

Postby Alex » 17 Jan 2011, 17:16

The configure thing with LINK is not an error as far as i am concerned. (Configure scripts test all sorts of stuff, and some errors are thrown usually, it's not a problem.)
Forum rules: viewtopic.php?t=4
Using Mediainfo: viewtopic.php?t=1110
Telnet: viewtopic.php?t=1873
Alex
Forum Goddess
 
Posts: 1799
Joined: 12 Nov 2009, 13:05

Re: libevent 1.4.14b compile error

Postby MartinHerrman » 17 Jan 2011, 21:11

Back home!

Error is now clear to me:

/bin/sh ./libtool --tag=CC --mode=compile /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -EL -Os -Wall -fno-strict-aliasing -MT evdns.lo -MD -MP -MF .deps/evdns.Tpo -c -o evdns.lo evdns.c
libtool: compile: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -EL -Os -Wall -fno-strict-aliasing -MT evdns.lo -MD -MP -MF .deps/evdns.Tpo -c evdns.c -fPIC -DPIC -o .libs/evdns.o
libtool: compile: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -EL -Os -Wall -fno-strict-aliasing -MT evdns.lo -MD -MP -MF .deps/evdns.Tpo -c evdns.c -o evdns.o >/dev/null 2>&1
mv -f .deps/evdns.Tpo .deps/evdns.Plo
/bin/sh ./libtool --tag=CC --mode=compile /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -EL -Os -Wall -fno-strict-aliasing -MT evrpc.lo -MD -MP -MF .deps/evrpc.Tpo -c -o evrpc.lo evrpc.c
libtool: compile: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -EL -Os -Wall -fno-strict-aliasing -MT evrpc.lo -MD -MP -MF .deps/evrpc.Tpo -c evrpc.c -fPIC -DPIC -o .libs/evrpc.o
libtool: compile: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -EL -Os -Wall -fno-strict-aliasing -MT evrpc.lo -MD -MP -MF .deps/evrpc.Tpo -c evrpc.c -o evrpc.o >/dev/null 2>&1
mv -f .deps/evrpc.Tpo .deps/evrpc.Plo
/bin/sh ./libtool --tag=CC --mode=link /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -EL -Os -Wall -fno-strict-aliasing -version-info 5:1:0 -release 2.0 -s -Xlinker -rpath /lib -Xlinker -rpath-link /opt/Sourcery_G++_Lite/lib/gcc/mips-linux-gnu/4.3.3/el -o libevent.la -rpath /root/EM7075/result/libevent/lib event.lo evthread.lo buffer.lo bufferevent.lo bufferevent_sock.lo bufferevent_filter.lo bufferevent_pair.lo listener.lo bufferevent_ratelim.lo evmap.lo log.lo evutil.lo evutil_rand.lo strlcpy.lo select.lo poll.lo epoll.lo signal.lo event_tagging.lo http.lo evdns.lo evrpc.lo -lrt
libtool: link: /opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -shared .libs/event.o .libs/evthread.o .libs/buffer.o .libs/bufferevent.o .libs/bufferevent_sock.o .libs/bufferevent_filter.o .libs/bufferevent_pair.o .libs/listener.o .libs/bufferevent_ratelim.o .libs/evmap.o .libs/log.o .libs/evutil.o .libs/evutil_rand.o .libs/strlcpy.o .libs/select.o .libs/poll.o .libs/epoll.o .libs/signal.o .libs/event_tagging.o .libs/http.o .libs/evdns.o .libs/evrpc.o -lrt -Wl,-rpath -Wl,-rpath-link -Wl,-soname -Wl,libevent-2.0.so.5 -o .libs/libevent-2.0.so.5.0.1
/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: .libs/event.o: compiled for a little endian system and target is big endian
/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: .libs/event.o: endianness incompatible with that of the selected emulation
/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: failed to merge target specific data of file .libs/event.o

I guess that ./configure is using big endian as target, but I don't know how to tell it to use little endian:

./configure --prefix=$DESTDIR --host=i686-pc-linux-gnu --target=mips-gnu-linux --build=mips-gnu-linux

or replace 'mips' with 'mipsel' gives same result.

In general: in your examples you also use different arguments, sometimes only --target=mips. There is no formal standard defined?
User avatar
MartinHerrman
Forum Supporter
 
Posts: 99
Joined: 08 May 2010, 11:24

Re: libevent 1.4.14b compile error

Postby Alex » 18 Jan 2011, 13:26

Code: Select all
/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: .libs/event.o: compiled for a little endian system and target is big endian
/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: .libs/event.o: endianness incompatible with that of the selected emulation
/opt/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld: failed to merge target specific data of file .libs/event.o



The reason the link fails is because you compile your target with -EL flag (which is required) but somewhere something got linked that was big endian.. oops.
Strange thing though, the compiler should pick this up from cflags.

Code: Select all
-rpath-link /opt/Sourcery_G++_Lite/lib/gcc/mips-linux-gnu/4.3.3/el

Does the above path exist? You need to link against the MIPSEL libs, in the EL folder.
The original codesourcery install has both normal endian and LE lib folders.. keep that in mind when you use newer versions..

I have only seen this when compiling some programs that do not care, or for some reason, ignore CFLAGS parameters.
In that case i just export the gcc including the -EL part.
Code: Select all
export CC="/opt/Sourcery_G++_Lite/bin/mips-linux-gnu-gcc -EL"


Hope this helps you out somewhat. Let me know :)
Forum rules: viewtopic.php?t=4
Using Mediainfo: viewtopic.php?t=1110
Telnet: viewtopic.php?t=1873
Alex
Forum Goddess
 
Posts: 1799
Joined: 12 Nov 2009, 13:05

Re: libevent 1.4.14b compile error

Postby MartinHerrman » 18 Jan 2011, 19:29

Cool, this works, thanks for the hint :-) Trying transmission now..
User avatar
MartinHerrman
Forum Supporter
 
Posts: 99
Joined: 08 May 2010, 11:24

Re: libevent 1.4.14b compile error

Postby Alex » 19 Jan 2011, 00:23

There's a problem in executable size, in the later versions. The flash space is ~32MByte max, and PKG size around 30MB max.
We need both transmission-remote, and transmission-daemon in the device. Remote talks to daemon and gets the download speeds shown on the OSD.
I ran into space problems, so i could not fit any recenter version on the flash.. you're bound to end up with the same issue.. :(
Forum rules: viewtopic.php?t=4
Using Mediainfo: viewtopic.php?t=1110
Telnet: viewtopic.php?t=1873
Alex
Forum Goddess
 
Posts: 1799
Joined: 12 Nov 2009, 13:05

Next

Return to EM7075 - Cross-compiling issues & tips

Who is online

Users browsing this forum: No registered users and 1 guest

cron