Re: [links] help on MIPS cross-compile
Karel Kulhavy <[email protected]> Tue, 12 Dec 2006 15:54:09 +0100
| Newsgroups | gmane.comp.web.links.list |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Dec 05, 2006 at 12:48:03AM -0800, Dougherty James wrote:
> Hello,
>
> I am trying to cross-compile on MIPS32 (Little Endian) with Framebuffer
> And graphics mode, I tried to build from the configure script as below.
> The problem is that I can't get the cross-compiler (configure script)
> To pass when cross-compiling and checking for libraries.
> Is there a way to disable this check from the configure script
I don't know. The GNU Compatibility Breakage Tools (autoconf, automake etc.)
are a nightmare for me. I have no idea how the garbage that's generated into
the ./configure works.
What I already have learnt by trial and error is that when configure explodes,
grep the config.log. Somewhere in the middle, in the most difficult place to
find, wrapped around by false grep positives, you will find something like "the
failed program was:". Examine the error message produced and fix the cause.
Then don't foget to remove config.cache (this file was added to maximize the
confusion) and run again, until the configure manages to go completely through.
Sometimes you can fix things by randomly adding -lpng, -lz, -ljpeg and
-L/usr/local/lib etc. into LDFLAGS and -I/usr/local/include into CPPFLAGS.
You use them like CPPFLAGS=blah LDFLAGS=bleh ./configure
CCPFLAGS are for the preprocessor, CFLAGS for the compiler, LDFLAGS for the
linker and CC is the compiler name.
CC is useful when for example you put -lpng into LDFLAGS and you see it was
stripped by the ./configure anyway. Then you can put it into CC, and though
it's dirty, it's brute force and may work. In the worst case try to rename gcc
and replace by a shell script like real_cc -magic_flag $@
This is how I do it with Highly Portable (TM) (=mostly all) programs on
OpenBSD. OpenBSD basically puts every library into a place different than
Linux to minimize the probability that programs find it during the compilation,
and this is a faster method than writing e-mails to maintainer of the package
that would be ignored or taken as a personal insult anyway.
Or delete the makefile and write a small makefile manually and figure out the
secret combination of libraries and include directory paths yourself (possibly
employing an automated exhaustive search running overnight ;-) ). Then you will
be sure it compiles ;-)
CL<
> Or add graphics support to a Makefile generated with --enable-graphics
> Turned on (which works I should add).
>
> Thank you very much in advance!
> -James
>
>
>
> In Tree, I have a directory:
>
> usr/jpeg
> usr/png
> usr/zlib
> usr/openssl
> usr/
>
> In Makefile, I have:
>
> COMPONENTS := png jpeg links
>
> build: $(foreach component,$(COMPONENTS),$(component))
>
> clean: $(foreach component,$(COMPONENTS),$(component)-clean)
> rm -rf $(INSTALLDIR)
>
> install: $(foreach component,$(COMPONENTS),$(component)-install)
>
>
> #Links Browser
> $(USER)/links/Makefile:
> cd links && export CFLAGS="$(CFLAGS) -I$(USER)/libpng" \
> LDFLAGS="$(LDFLAGS) -L$(INSTALLDIR)/usr/local/lib -lpng
> -lpng12"\
> CC=mipsel-linux-gnu-gcc LD=mipsel-linux-gnu-ld \
> CPPFLAGS="$(CFLAGS)"\
> PKG_CONFIG_PATH="$(USER)/libpng"\
> LIBPNG12_CFLAGS"=-I(INSTALLDIR)/usr/local/include/libpng12"\
> LIBPNG12_LIBS="-L$(INSTALLDIR)/usr/local/lib -lpng12" &&
> ./configure --enable-graphics --target=mipsel-linux
>
>
> links: $(USER)/links/Makefile
> $(MAKE) -C links
>
> links-install: links
> $(MAKE) -C links install
>
> links-distclean:
> $(MAKE) -C links distclean
>
>
> On Linux:
>
> # make CHIP=decypher links
> cd links && export CPPFLAGS="-Dlinux
> -I/work/firmware2/jfd/8100/src/mipsel-linux/linux-2.6/include
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/nmtk
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/zlib
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/libdecoder
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/zlib
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/libpng" \
> LDFLAGS="-L.
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/zlib
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/libzvbi/src/.libs
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/rootfs-install/lib
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/libpng/.libs
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/rootfs-install/usr/local
> /lib -lpng -lpng12"\
> CC=mipsel-linux-gnu-gcc LD=mipsel-linux-gnu-ld \
> CPPFLAGS="-Dlinux
> -I/work/firmware2/jfd/8100/src/mipsel-linux/linux-2.6/include
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/nmtk
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/zlib
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/libdecoder"\
> PKG_CONFIG_PATH="/work/firmware2/jfd/8100/src/mipsel-linux/usr/libpng"\
> LIBPNG12_CFLAGS"=-I(INSTALLDIR)/usr/local/include/libpng12"\
> LIBPNG12_LIBS="-L/work/firmware2/jfd/8100/src/mipsel-linux/usr/rootfs-in
> stall/usr/local/lib -lpng12" && ./configure --enable-graphics
> --target=mipsel-linux
> --with-directfb="/work/firmware2/jfd/8100/src/mipsel-linux/usr/directfb"
> loading cache ./config.cache
> checking for a BSD compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking whether make sets ${MAKE}... yes
> checking for working aclocal... found
> checking for working autoconf... found
> checking for working automake... found
> checking for working autoheader... found
> checking for working makeinfo... found
> checking for gcc... mipsel-linux-gnu-gcc
> checking whether the C compiler (mipsel-linux-gnu-gcc -Dlinux
> -I/work/firmware2/jfd/8100/src/mipsel-linux/linux-2.6/include
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/nmtk
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/zlib
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/libdecoder -L.
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/zlib
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/libzvbi/src/.libs
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/rootfs-install/lib
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/libpng/.libs
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/rootfs-install/usr/local
> /lib -lpng -lpng12) works... yes
> checking whether the C compiler (mipsel-linux-gnu-gcc -Dlinux
> -I/work/firmware2/jfd/8100/src/mipsel-linux/linux-2.6/include
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/nmtk
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/zlib
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/libdecoder -L.
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/zlib
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/libzvbi/src/.libs
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/rootfs-install/lib
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/libpng/.libs
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/rootfs-install/usr/local
> /lib -lpng -lpng12) is a cross-compiler... yes
> checking whether we are using GNU C... yes
> checking whether mipsel-linux-gnu-gcc accepts -g... yes
> checking how to run the C preprocessor... mipsel-linux-gnu-gcc -E
> checking for ANSI C header files... yes
> checking whether mipsel-linux-gnu-gcc needs -traditional... no
> checking for EMX... no
> checking for typeof... yes
> checking for long long... yes
> checking for dirent.h that defines DIR... yes
> checking for opendir in -ldir... no
> checking for sys/wait.h that is POSIX.1 compatible... yes
> checking for fcntl.h... yes
> checking for limits.h... yes
> checking for sys/ioctl.h... yes
> checking for sys/time.h... yes
> checking for time.h... yes
> checking for unistd.h... yes
> checking for math.h... yes
> checking for ieee.h... no
> checking for endian.h... yes
> checking for values.h... yes
> checking for sigaction.h... no
> checking for netinet/in_systm.h... yes
> checking for netinet/in_system.h... no
> checking for netinet/ip.h... yes
> checking for netinet/dhcp.h... no
> checking for sys/select.h... yes
> checking for sys/resource.h... yes
> checking for sys/utsname.h... yes
> checking for sys/un.h... yes
> checking for sys/fmutex.h... no
> checking for sys/cygwin.h... no
> checking for io.h... no
> checking for setjmp.h... yes
> checking for langinfo.h... yes
> checking for md5.h... no
> checking for working const... yes
> checking for inline... inline
> checking for size_t... yes
> checking for socklen_t... yes
> checking whether time.h and sys/time.h may both be included... yes
> checking whether struct tm is in sys/time.h or time.h... time.h
> checking size of short... 0
> checking size of unsigned short... 0
> checking size of int... 0
> checking size of unsigned... 0
> checking size of long... 0
> checking size of unsigned long... 0
> checking for big endian... no
> checking for little endian... no
> checking if rename can replace existing files... no
> checking for 8-bit clean memcmp... no
> checking return type of signal handlers... void
> checking for strftime... yes
> checking for vprintf... yes
> checking for calloc... yes
> checking for snprintf... yes
> checking for memmove... yes
> checking for raise... yes
> checking for gettimeofday... yes
> checking for mkdir... yes
> checking for select... yes
> checking for strcspn... yes
> checking for strerror... yes
> checking for strstr... yes
> checking for strtol... yes
> checking for strtoul... yes
> checking for strtoq... yes
> checking for strtoll... yes
> checking for chmod... yes
> checking for getpid... yes
> checking for setpgid... yes
> checking for popen... yes
> checking for uname... yes
> checking for getpagesize... yes
> checking for tempnam... yes
> checking for strptime... yes
> checking for setlocale... yes
> checking for nl_langinfo... yes
> checking for sigsetjmp/siglongjmp... yes
> checking for atan in -lm... yes
> checking for MD5Data in -lmd... no
> checking for MD5Init... no
> checking for MD5Data... no
> checking for socket... yes
> checking for setsockopt... yes
> checking for gethostbyname... yes
> checking for gethostbyaddr... yes
> checking for dhcp_option... no
> checking for herror... yes
> checking for cfmakeraw... yes
> checking for cygwin_conv_to_full_win32_path... no
> checking for requested debug level... 2
> checking if you want to enable javascript... no
> checking if you want to use graphics... yes
> checking for Gpm_Open in -lgpm... no
> checking for gpm.h... no
> checking for OS/2 threads... no
> checking for atheos/threads.h... no
> checking for spawn_thread... no
> checking for resume_thread... no
> checking for MouOpen... no
> checking for _read_kbd... no
> checking for XFree for OS/2... no
> checking for dlopen in -ldl... yes
> checking for pkg-config... /usr/bin/pkg-config
> checking for openssl... Package openssl was not found in the pkg-config
> search path.
> Perhaps you should add the directory containing `openssl.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'openssl' found
> checking for OpenSSL... no
> checking for svgalib... no
> checking for linux/fb.h... yes
> checking for linux/kd.h... yes
> checking for linux/vt.h... yes
> checking for sys/mman.h... yes
> checking for directfb-config... no
> checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
> checking for pmshell... no
> checking for gui/view.h... no
> checking for gui/window.h... no
> checking for gui/desktop.h... no
> checking for gui/bitmap.h... no
> checking for util/locker.h... no
> checking for util/application.h... no
> checking for inflate in -lz... no
> checking for libpng >= 1.0.0... yes
> checking LIBPNG_CFLAGS...
> -I/work/firmware2/jfd/8100/src/mipsel-linux/usr/rootfs-install/usr/local
> /include/libpng12
> checking LIBPNG_LIBS...
> -L/work/firmware2/jfd/8100/src/mipsel-linux/usr/rootfs-install/usr/local
> /lib -lpng12 -lz -lm
> checking for png.h... no
> checking for libpng/png.h... no
> checking for png_create_info_struct in -lpng... no
> configure: error: You need libpng to compile Links in graphics mode
> make: *** [/work/firmware2/jfd/8100/src/mipsel-linux/usr/links/Makefile]
> Error 1
> #
_______________________________________________
links-list mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/links-list