I'm trying to cross compile nss 3.12.5 for armeb-xscale-linux-gnueabi using ptxdist. I followed your suggestions and also had to patch several things to get it mostly working. A host copy is built prior to building the target copy. But now I'm stuck. The host copy of shlibsign is complaining that "ELF file data encoding not little-endian".
sh /home/georgem/devel/workspace-vulcan_svn/build-target/nss-3.12.5-with-nspr-4.8.2/mozilla/security/nss/cmd/shlibsign/./sign.sh /home/georgem/devel/workspace-vulcan_svn/build-target/nss-3.12.5-with-nspr-4.8.2/mozilla/security/nss/cmd/shlibsign/../../../../dist/Linux2.6_arm_armeb-xscale-linux-gnueabi-gcc_glibc_PTH_DBG.OBJ \ /home/georgem/devel/workspace-vulcan_svn/build-target/nss-3.12.5-with-nspr-4.8.2/mozilla/security/nss/cmd/shlibsign/Linux2.6_arm_armeb-xscale-linux-gnueabi-gcc_glibc_PTH_DBG.OBJ Linux \ /home/georgem/devel/workspace-vulcan_svn/build-target/nss-3.12.5-with-nspr-4.8.2/mozilla/security/nss/cmd/shlibsign/../../../../dist/Linux2.6_arm_armeb-xscale-linux-gnueabi-gcc_glibc_PTH_DBG.OBJ/lib /home/georgem/devel/workspace-vulcan_svn/build-target/nss-3.12.5-with-nspr-4.8.2/mozilla/security/nss/cmd/shlibsign/../../../../dist/Linux2.6_arm_armeb-xscale-linux-gnueabi-gcc_glibc_PTH_DBG.OBJ/lib/libsoftokn3.so /home/georgem/devel/workspace-vulcan_svn/build-host/nss-3.12.5-with-nspr-4.8.2/mozilla/security/nss/cmd/shlibsign/Linux2.6_x86_glibc_PTH_DBG.OBJ/shlibsign -v -i /home/georgem/devel/workspace-vulcan_svn/build-target/nss-3.12.5-with-nspr-4.8.2/mozilla/security/nss/cmd/shlibsign/../../../../dist/Linux2.6_arm_armeb-xscale-linux-gnueabi-gcc_glibc_PTH_DBG.OBJ/lib/libsoftokn3.so /home/georgem/devel/workspace-vulcan_svn/build-host/nss-3.12.5-with-nspr-4.8.2/mozilla/security/nss/cmd/shlibsign/Linux2.6_x86_glibc_PTH_DBG.OBJ/shlibsign: error while loading shared libraries: /home/georgem/devel/workspace-vulcan_svn/build-target/nss-3.12.5-with-nspr-4.8.2/mozilla/security/nss/cmd/shlibsign/../../../../dist/Linux2.6_arm_armeb-xscale-linux-gnueabi-gcc_glibc_PTH_DBG.OBJ/lib/libplc4.so: ELF file data encoding not little-endian gmake[3]: *** [../../../../dist/Linux2.6_arm_armeb-xscale-linux-gnueabi-gcc_glibc_PTH_DBG.OBJ/lib/libsoftokn3.chk] Error 127 Regards, George relyea wrote: > > On 10/14/2009 02:46 PM, CB wrote: >> I'm using WindRiver Linux 2.0 to cross compile nss to a PowerPC. The >> 3.11.4 build instructions and troubleshooting don't cover something >> like this. Can someone point me to documentation that would describe >> how to set the compiler, flags, install location, etc...? >> > I know some folks have has some success at cross compiling. (Caveat, I > have not tried to cross compile NSS in quite a while). > > Your best bet is to create a cross-compile ${OS_CONFIG}.mk file for your > target platform in mozilla/security/coreconf. You can use Linux.mk and > Linux2.6.mk as samples (or WINCE.mk and WINCE3.0.mk which are cross > complied from windows to WINCE). > > coreconf normally determines OS_CONFIG automatically from OS_TARGET and > OS_RELEASE. The latter two are automatically determined by examining > uname on your platform. To cross compile, you would set the OS_TARGET > and OS_TARGET_RELEASE environment variables to your target OS. This will > override the what coreconf will automatically pick up. > > NSS builds 2 types of tools as part of the build process: 1) tools to > help in the build, and 2) target tools. The latter is basically > nsinstall, built by coreconf. Those tools build with the compiler > specified by NATIVE_CC and with the flags specified with NATIVE_FLAGS > [WINCE avoids this altogether. on windows, nsinstall is shipped in the > mozilla build environment and not built]. > > So setting those targets plus the NATIVE_CC and NATIVE_FLAGS should get > you to the point where NSS tries to create it's check files (*.ckh), > after all the libraries and most of the tools have built. The problem > here is NSS uses the tools and libraries it has just built to build the > .chk files. Probably the easiest way to handle that is to require NSS > and shlibsign to be installed on your native machine and modify > mozilla/security/nss/cmd/shlibsign/sign.sh to use the native machine's > shlibsign (If you add a 'NATIVE_SHLIBSIGN' environment variable which > sign.sh picks up, that could be used by other cross-platforms as well, > and will likely be accepted as a patch to NSS in general. > > If you get this working, it might be good to record what you had to do > on our wiki at https://developer.mozilla.org/en/NSS > > bob > > > > > > > -- > dev-tech-crypto mailing list > dev-tech-crypto@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-tech-crypto > -- View this message in context: http://old.nabble.com/need-help-cross-compiling-nss-tp25899698p27165460.html Sent from the Mozilla - Cryptography mailing list archive at Nabble.com. -- dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto