pam uses the hosts gcc when linking and that will fail when xcompiling: ... gcc -shared -Wl,-soname -Wl,libpam.so.0 -o libpam.so dynamic/pam_item.o dynamic/pam_strerror.o dynamic/pam_end.o dynamic/pam_start.o dynamic/pam_data.o dynamic/pam_delay.o dynamic/pam_dispatch.o dynamic/pam_handlers.o dynamic/pam_misc.o dynamic/pam_account.o dynamic/pam_auth.o dynamic/pam_session.o dynamic/pam_password.o dynamic/pam_env.o dynamic/pam_log.o \ -lc -ldl /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld: dynamic/pam_item.o: Relocations in generic ELF (EM: 20) dynamic/pam_item.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status I have a simple patch that will fix this. I had to remove some ldconfig stuff as well that I dont know what to do with.
Created attachment 95833 [details, diff] Patch for pam xcompile
configure patch looks sane as for the LDCONFIG stuff, i would just force LDCONFIG to like '/bin/true' in the build system rather than trying to patch stuff out
I just tried again without the LDCONFIG part applied and that worked too. Dunno why I removed that(I have had this patch for a while and forgot to send it in). It will be enough to apply just the configure.in part.
Created attachment 97387 [details, diff] cross compile patch #2 New version of the xcompile patch. This patch only patches configure.in Replacing LDCONFIG="" with LDCONFIG="/bin/true" in the ebuild removes some nonfatal error while building. I hope this is OK to commit.
Created attachment 97704 [details, diff] cross compile patch #3 better patch per vapier suggestion
status?
Can you see if 0.99 still has this problem?
(In reply to comment #7) > Can you see if 0.99 still has this problem? I have moved on and is using 0.78-r3. Product is in final testing and we will not change anything unless there is a problem, sorry.
0.99 is worse for cross-compile because it tries to build and then run "padout" as part of the build process but it doesn't take into account cross situations. i.e. padout is the target architecture. padout is in docs, so we could probably force no docs in cross situations, or we can modify the build to also build a native padout during the build and use that during the build but install the cross-built one. After I get back from vacation in a couple weeks I might be able to work on that.
Joel, is 0.99.7.0 better now? doc re-generation has stopped and we instead use upstream-provided documentation that should cover for it.
I just tried 0.99.7.1 and it still builds padout (for the CHOST) and tries to run it: ./padout < ./draft-morgan-pam.raw > draft-morgan-pam-current.txt /bin/sh: ./padout: cannot execute binary file make[4]: *** [draft-morgan-pam-current.txt] Error 126
*** Bug 191478 has been marked as a duplicate of this bug. ***
Linux-PAM 0.78 is no more supported, so closing this bug down as CANTFIX. If PAM 0.99.8.1-r1 or PAM 0.99.9.0 does not crosscompile either, please open a new bug.