gcc-static is unnecessarily rebuilt each time make is invoked due to an incorrect filename extension in the Makefile target definition. Patch follows:
diff –git a/Makefile b/Makefile
index 4ab3882..568739d 100644
— a/Makefile
+++ b/Makefile
@@ -173,10 +173,10 @@ binutils-distclean: binutils-clean
# GCC-STATIC
-$(WORK)/gcc-$(GCC_VERSION).tar.bz2:
+$(WORK)/gcc-$(GCC_VERSION).tar.xz:
wget -P $(WORK) -c ftp://gcc.gnu.org/pub/gcc/releases/gcc-$(GCC_VERSION)/gcc-$(GCC_VERSION).tar.xz
-$(WORK)/gcc-$(GCC_VERSION): $(WORK)/gcc-$(GCC_VERSION).tar.bz2
+$(WORK)/gcc-$(GCC_VERSION): $(WORK)/gcc-$(GCC_VERSION).tar.xz
tar -C $(WORK) -xf $(WORK)/gcc-$(GCC_VERSION).tar.xz touch $(WORK)/gcc-$(GCC_VERSION)
We need to be sure we build python (generic native build) with shm mounted.
We are facing a problem while building icu port:
...
mkdir uconvmsg
LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH ../../bin/genrb -e UTF-8 -s resources -d uconvmsg root.txt
LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH ../../bin/genrb -e UTF-8 -s resources -d uconvmsg fr.txt
../../bin/genrb: error while loading shared libraries: ../../lib/libicudata.so.56: internal error
Makefile:173: recipe for target ‘uconvmsg/root.res’ failed
make[2]: * [uconvmsg/root.res] Error 127
make[2]: * Waiting for unfinished jobs....
../../bin/genrb: error while loading shared libraries: ../../lib/libicudata.so.56: internal error
Makefile:173: recipe for target ‘uconvmsg/fr.res’ failed
make[2]: * [uconvmsg/fr.res] Error 127
make[3]: Entering directory ‘/home/pkgmk/work/src/icu/source/extra/uconv’
rm -rf pkgdata.inc
make[3]: Leaving directory ‘/home/pkgmk/work/src/icu/source/extra/uconv’
make[2]: Leaving directory ‘/home/pkgmk/work/src/icu/source/extra/uconv’
Makefile:47: recipe for target ‘all-recursive’ failed
make[1]: * [all-recursive] Error 2
make[1]: Leaving directory ‘/home/pkgmk/work/src/icu/source/extra’ Makefile:143: recipe for target ‘all-recursive’ failed
make: *** [all-recursive] Error 2
======⇒ ERROR: Building ‘/home/pkgmk/pkg/icu#56.1-1.pkg.tar.xz’ failed.
prt-get: error while install
We can see that needed libs aren’t detected:
# ldd genrb
libicutu.so.56 => not found libicui18n.so.56 => not found libicuuc.so.56 => not found libicudata.so.56 => not found libpthread.so.0 => /lib/libpthread.so.0 (0xb6f14000) libdl.so.2 => /lib/libdl.so.2 (0xb6f01000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb6dc1000) libm.so.6 => /lib/libm.so.6 (0xb6d46000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xb6d19000) libc.so.6 => /lib/libc.so.6 (0xb6bde000) /lib/ld-linux-armhf.so.3 (0xb6f3d000)
Needed libraries are found in ./source/lib/. Trying to run the binary exporting LD_LIBRARY_PATH=./source/lib ./source/bin/genrb doesn’t work.
Looks like there is a compile bug that’s been open since 2005 for arm platforms: http://sourceforge.net/p/libcgi/bugs/6/
Patching the string.c file and compiling fixes the package. We might want to fix it since upstream is unresponsive.
Currently with default efikamx rootfs i get an illegal instruction fail (efikamx smartbook):
prt-get depinst firefox.. (full log at http://pastebin.com/LYFwgjDA )
....
make[5]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/netwerk/dns’ make[5]: Entering directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/toolkit/devtools/security’ Unified_cpp_devtools_security0.o
libtoolkit_devtools_security.a.desc
make[5]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/toolkit/devtools/security’ make[5]: Entering directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/widget’ nsBaseWidget.o
Unified_cpp_widget0.o
liburiloader_prefetch.a.desc
make[5]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/uriloader/prefetch’ Unified_cpp_widget1.o
Unified_cpp_widget2.o
make[5]: Entering directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/editor/libeditor’ Unified_cpp_editor_libeditor0.o
Unified_cpp_editor_libeditor1.o
Unified_cpp_editor_libeditor2.o
libwidget.a.desc
make[5]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/widget’ In file included from /usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/editor/libeditor/Unified_cpp_editor_libeditor1.cpp:11:0:
/usr/ports/opt-arm/firefox/work/src/mozilla-release/editor/libeditor/nsEditor.cpp: In member function ‘nsresult nsEditor::JoinNodes(nsINode&, nsINode&)’:
/usr/ports/opt-arm/firefox/work/src/mozilla-release/editor/libeditor/nsEditor.cpp:1507:10: warning: ‘result’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return result; ^
make[5]: Entering directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/dom/battery’ BatteryManager.o
libdom_battery.a.desc
make[5]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/dom/battery’ make[5]: Entering directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/security/manager/boot/src’ Unified_cpp_manager_boot_src0.o
libsecurity_manager_boot_src.a.desc
make[5]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/security/manager/boot/src’ make[5]: Entering directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/dom/mathml’ Unified_cpp_dom_mathml0.o
libdom_mathml.a.desc
make[5]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/dom/mathml’ make[5]: Entering directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/intl/uconv’ Unified_c_intl_uconv0.o
Unified_cpp_intl_uconv0.o
Unified_cpp_intl_uconv1.o
Unified_cpp_intl_uconv2.o
Unified_cpp_intl_uconv3.o
Unified_cpp_intl_uconv4.o
Unified_cpp_intl_uconv5.o
Unified_cpp_intl_uconv6.o
libintl_uconv.a.desc
make[5]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/intl/uconv’ make[5]: Entering directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/accessible/base’ Unified_cpp_accessible_base0.o
Unified_cpp_accessible_base1.o
In file included from /usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/editor/libeditor/Unified_cpp_editor_libeditor1.cpp:110:0:
/usr/ports/opt-arm/firefox/work/src/mozilla-release/editor/libeditor/nsHTMLEditor.cpp: In member function ‘virtual nsresult nsHTMLEditor::BeginningOfDocument()’:
/usr/ports/opt-arm/firefox/work/src/mozilla-release/editor/libeditor/nsHTMLEditor.cpp:579:48: warning: ‘selOffset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return selection->Collapse(selNode, selOffset); ^
In file included from /usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/editor/libeditor/Unified_cpp_editor_libeditor1.cpp:137:0:
/usr/ports/opt-arm/firefox/work/src/mozilla-release/editor/libeditor/nsHTMLInlineTableEditor.cpp: At global scope:
/usr/ports/opt-arm/firefox/work/src/mozilla-release/editor/libeditor/nsHTMLInlineTableEditor.cpp:271:1: internal compiler error: Illegal instruction
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
In the directory /usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/editor/libeditor
The following command failed to execute properly:
c++ -o Unified_cpp_editor_libeditor1.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include /usr/ports/opt-arm/firefox/work/src/mozilla-release/config/gcc_hidden.h -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DMOZ_GLUE_IN_PROGRAM -DAB_CD=en-US -DNO_NSPR_10_SUPPORT -I/usr/ports/opt-arm/firefox/work/src/mozilla-release/editor/libeditor -I. -I/usr/ports/opt-arm/firefox/work/src/mozilla-release/dom/base -I/usr/ports/opt-arm/firefox/work/src/mozilla-release/editor/txmgr -I/usr/ports/opt-arm/firefox/work/src/mozilla-release/extensions/spellcheck/src -I/usr/ports/opt-arm/firefox/work/src/mozilla-release/layout/generic -I/usr/ports/opt-arm/firefox/work/src/mozilla-release/layout/style -I/usr/ports/opt-arm/firefox/work/src/mozilla-release/layout/tables -I/usr/ports/opt-arm/firefox/work/src/mozilla-release/layout/xul -I../../dist/include -I/usr/include/nspr -I/usr/include/nss -I/usr/include/pixman-1 -fPIC -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MP -MF .deps/Unified_cpp_editor_libeditor1.o.pp -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -O2 -pipe -mfloat-abi=hard -march=armv7-a -mfpu=vfpv3-d16 -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -g -O2 -pipe -mfloat-abi=hard -march=armv7-a -mfpu=vfpv3-d16 -fomit-frame-pointer /usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/editor/libeditor/Unified_cpp_editor_libeditor1.cpp
/usr/ports/opt-arm/firefox/work/src/mozilla-release/config/rules.mk:930: recipe for target ‘Unified_cpp_editor_libeditor1.o’ failed
make[5]: * [Unified_cpp_editor_libeditor1.o] Error 1
make[5]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/editor/libeditor’
/usr/ports/opt-arm/firefox/work/src/mozilla-release/config/recurse.mk:74: recipe for target ‘editor/libeditor/target’ failed
make[4]: * [editor/libeditor/target] Error 2
make[4]: * Waiting for unfinished jobs....
libaccessible_base.a.desc
make[5]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared/accessible/base’
make[4]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared’
/usr/ports/opt-arm/firefox/work/src/mozilla-release/config/recurse.mk:36: recipe for target ‘compile’ failed
make[3]: * [compile] Error 2
make[3]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared’ /usr/ports/opt-arm/firefox/work/src/mozilla-release/config/rules.mk:541: recipe for target ‘default’ failed
make[2]: * [default] Error 2
make[2]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release/firefox-shared’
/usr/ports/opt-arm/firefox/work/src/mozilla-release/client.mk:400: recipe for target ‘realbuild’ failed
make[1]: * [realbuild] Error 2
make[1]: Leaving directory ‘/usr/ports/opt-arm/firefox/work/src/mozilla-release’ client.mk:171: recipe for target ‘build’ failed
make: *** [build] Error 2
======⇒ ERROR: Building ‘/usr/ports/opt-arm/firefox/firefox#39.0-2.pkg.tar.gz’ failed.
It’s nice to be able to gzip modules to save space. Can –with-zlib please be added to kmod? I have it working well with my setup but it would be nice if this was mainlined.
Thanks!
Current libgmp version 5.0.5 fails with assembler error.
The problem is located on upstream Pkgfile which forces the build for i686.
[...]
tmp-add_n.s: Assembler messages:
tmp-add_n.s:79: Error: bad instruction `xor %edx,%edx’ [...]
From the original Pkgfile, it specifies:
–build=i686-pc-linux-gnu
Solution:
- Use current build vars for both ABI’s:
- softfp: –build=arm-unknown-linux-gnueabi
libtool tries to relink during installation but failed due to host libraries
libtool: relink: arm-crux-linux-gnueabihf-g++ -fPIC -DPIC -shared -nostdlib /home/sepen/devel/crux-arm/toolchain/clfs/usr/lib/crti.o /home/sepen/devel/crux-arm/toolchain/crosstools/lib/gcc/arm-crux-linux-gnueabihf/4.8.3/crtbeginS.o .libs/dummy.o cxx/.libs/isfuns.o cxx/.libs/ismpf.o cxx/.libs/ismpq.o cxx/.libs/ismpz.o cxx/.libs/ismpznw.o cxx/.libs/limits.o cxx/.libs/osdoprnti.o cxx/.libs/osfuns.o cxx/.libs/osmpf.o cxx/.libs/osmpq.o cxx/.libs/osmpz.o -Wl,-rpath -Wl,/home/sepen/devel/crux-arm/toolchain/crosstools/lib/gcc/arm-crux-linux-gnueabihf/4.8.3/../../../../arm-crux-linux-gnueabihf/lib -L/home/sepen/devel/crux-arm/ports/crossrootfs/libgmp/work/pkg/usr/lib -L/usr/lib -lgmp -L/home/sepen/devel/crux-arm/toolchain/crosstools/lib/gcc/arm-crux-linux-gnueabihf/4.8.3 -L/home/sepen/devel/crux-arm/toolchain/crosstools/lib/gcc/arm-crux-linux-gnueabihf/4.8.3/../../../../arm-crux-linux-gnueabihf/lib -L/home/sepen/devel/crux-arm/toolchain/clfs/lib -L/home/sepen/devel/crux-arm/toolchain/clfs/usr/lib -L/home/sepen/devel/crux-arm/ports/crossrootfs/libgmp/work/pkg/home/sepen/devel/crux-arm/toolchain/crosstools/lib/gcc/arm-crux-linux-gnueabihf/4.8.3/../../../../arm-crux-linux-gnueabihf/lib -lstdc++ -lm -lc -lgcc_s /home/sepen/devel/crux-arm/toolchain/crosstools/lib/gcc/arm-crux-linux-gnueabihf/4.8.3/crtendS.o /home/sepen/devel/crux-arm/toolchain/clfs/usr/lib/crtn.o -O2 -mfloat-abi=hard -Wl,-soname -Wl,libgmpxx.so.4 -o .libs/libgmpxx.so.4.4.0
/usr/lib/libstdc++.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
libtool: install: error: relink `libgmpxx.la’ with the above command before installing it
There is a good explanation of the problem in this thread:
https://lists.debian.org/debian-devel/2011/02/msg00196.html (Fun with libtool and cross-builds)
We can reproduce that problem when building crossrootfs on a x86_64 host. Our final target is arm 32bits so we can’t link against non-32bits objects, and that is for what we didn’t detect issues when building crossrootfs on a x86 host.
I’m not happy with this situation.
libtool: link: arm-crux-linux-gnueabihf-gcc -std=gnu99 -shared -fPIC -DPIC .libs/copy-acl.o .libs/set-acl.o .li
bs/allocator.o .libs/areadlink.o .libs/argmatch.o .libs/gl_array_list.o .libs/backupfile.o .libs/addext.o .libs/b
asename.o .libs/binary-io.o .libs/c-ctype.o .libs/c-strcasecmp.o .libs/c-strncasecmp.o .libs/c-strcasestr.o .libs
/c-strstr.o .libs/careadlinkat.o .libs/classpath.o .libs/clean-temp.o .libs/cloexec.o .libs/closeout.o .libs/conc
at-filename.o .libs/copy-file.o .libs/csharpcomp.o .libs/csharpexec.o .libs/error-progname.o .libs/execute.o .lib
s/exitfail.o .libs/fatal-signal.o .libs/fd-hook.o .libs/fd-ostream.o .libs/fd-safer-flag.o .libs/dup-safer-flag.o
.libs/file-ostream.o .libs/findprog.o .libs/fstrcmp.o .libs/full-write.o .libs/fwriteerror.o .libs/gcd.o .libs/h
ash.o .libs/html-ostream.o .libs/html-styled-ostream.o .libs/javacomp.o .libs/javaexec.o .libs/javaversion.o .lib
s/gl_linkedhash_list.o .libs/gl_list.o .libs/localcharset.o .libs/localename.o glthread/.libs/lock.o .libs/malloc
a.o .libs/mbchar.o .libs/mbiter.o .libs/mbslen.o .libs/mbsstr.o .libs/mbswidth.o .libs/mbuiter.o .libs/ostream.o
.libs/pipe-filter-ii.o .libs/pipe-filter-aux.o .libs/pipe2.o .libs/pipe2-safer.o .libs/progname.o .libs/propernam
e.o .libs/acl-errno-valid.o .libs/file-has-acl.o .libs/qcopy-acl.o .libs/qset-acl.o .libs/quotearg.o .libs/safe-r
ead.o .libs/safe-write.o .libs/sh-quote.o .libs/sig-handler.o .libs/spawn-pipe.o .libs/striconv.o .libs/striconve
h.o .libs/striconveha.o .libs/strnlen1.o .libs/styled-ostream.o .libs/tempname.o .libs/term-ostream.o .libs/term-
styled-ostream.o glthread/.libs/threadlib.o glthread/.libs/tls.o .libs/tmpdir.o .libs/trim.o uniconv/.libs/u8-con
v-from-enc.o unilbrk/.libs/lbrktables.o unilbrk/.libs/u8-possible-linebreaks.o unilbrk/.libs/u8-width-linebreaks.
o unilbrk/.libs/ulc-common.o unilbrk/.libs/ulc-width-linebreaks.o uniname/.libs/uniname.o .libs/unistd.o .libs/du
p-safer.o .libs/fd-safer.o .libs/pipe-safer.o unistr/.libs/u16-mbtouc.o unistr/.libs/u16-mbtouc-aux.o unistr/.lib
s/u8-check.o unistr/.libs/u8-mblen.o unistr/.libs/u8-mbtouc.o unistr/.libs/u8-mbtouc-aux.o unistr/.libs/u8-mbtouc
-unsafe.o unistr/.libs/u8-mbtouc-unsafe-aux.o unistr/.libs/u8-mbtoucr.o unistr/.libs/u8-prev.o unistr/.libs/u8-uc
tomb.o unistr/.libs/u8-uctomb-aux.o uniwidth/.libs/width.o .libs/wait-process.o .libs/wctype-h.o .libs/xmalloc.o
.libs/xstrdup.o .libs/xconcat-filename.o .libs/xerror.o .libs/gl_xlist.o .libs/xmalloca.o .libs/xreadlink.o .libs
/xsetenv.o .libs/xsize.o .libs/xstriconv.o .libs/xstriconveh.o .libs/xvasprintf.o .libs/xasprintf.o .libs/asnprin
tf.o .libs/dup2.o .libs/fcntl.o .libs/fnmatch.o .libs/getopt.o .libs/getopt1.o .libs/memchr.o .libs/printf-args.o
.libs/printf-parse.o .libs/strstr.o .libs/tparm.o .libs/tputs.o .libs/vasnprintf.o -Wl,–whole-archive ./.libs/
libcroco_rpl.a ./.libs/libglib_rpl.a ./.libs/libxml_rpl.a -Wl,–no-whole-archive -Wl,-rpath -Wl,/des/crux-arm/3.
1/toolchain/clfs/usr/lib -Wl,-rpath -Wl,/des/crux-arm/3.1/toolchain/clfs/usr/lib /des/crux-arm/3.1/toolchain/clfs
/usr/lib/libacl.so -L/usr/lib /usr/lib/libattr.so -O2 -mfloat-abi=hard -Wl,-soname -Wl,libgettextlib-0.19.1.so
-o .libs/libgettextlib-0.19.1.so
/usr/lib/libattr.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[5]: * [libgettextlib.la] Error 1
make[5]: Leaving directory `/des/crux-arm/3.1/crossrootfs/gettext/work/src/gettext-0.19.1/gettext-tools/gnulib-li
b’
make[4]: * [all] Error 2
make[4]: Leaving directory `/des/crux-arm/3.1/crossrootfs/gettext/work/src/gettext-0.19.1/gettext-tools/gnulib-lib’ make[3]: * [all-recursive] Error 1
make[3]: Leaving directory `/des/crux-arm/3.1/crossrootfs/gettext/work/src/gettext-0.19.1/gettext-tools’
make[2]: * [all] Error 2
make[2]: Leaving directory `/des/crux-arm/3.1/crossrootfs/gettext/work/src/gettext-0.19.1/gettext-tools’ make[1]: * [all-recursive] Error 1
make[1]: Leaving directory `/des/crux-arm/3.1/crossrootfs/gettext/work/src/gettext-0.19.1’
make: * [all] Error 2
We can see that overlays aren’t providing the right version for pkgutils.
In ports/core-arm we can see version 5.35.5 and in the overlays we see version 5.35.3.
Waiting comments to see what to do (not many differences between those versions but IMHO they should be fixed in overlays).