Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 146132 - sys-libs/pam-0.78-r3 does not cross compile.
Summary: sys-libs/pam-0.78-r3 does not cross compile.
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: PAM Gentoo Team (OBSOLETE)
: 191478 (view as bug list)
Depends on: 185203
Blocks: 206166
  Show dependency tree
Reported: 2006-09-03 06:50 UTC by Joakim Tjernlund
Modified: 2007-11-04 15:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

Patch for pam xcompile (pam-0.78-xcompile.patch,1.86 KB, patch)
2006-09-03 06:51 UTC, Joakim Tjernlund
Details | Diff
cross compile patch #2 (pam-0.78-xcompile-1.patch,619 bytes, patch)
2006-09-19 00:57 UTC, Joakim Tjernlund
Details | Diff
cross compile patch #3 (xcompile.patch,710 bytes, patch)
2006-09-21 16:08 UTC, Joakim Tjernlund
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2006-09-03 06:50:11 UTC
pam uses the hosts gcc when linking and that will fail when xcompiling:
gcc -shared  -Wl,-soname -Wl, -o 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.
Comment 1 Joakim Tjernlund 2006-09-03 06:51:30 UTC
Created attachment 95833 [details, diff]
Patch for pam xcompile
Comment 2 SpanKY gentoo-dev 2006-09-03 16:03:44 UTC
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
Comment 3 Joakim Tjernlund 2006-09-04 15:38:06 UTC
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 part.
Comment 4 Joakim Tjernlund 2006-09-19 00:57:18 UTC
Created attachment 97387 [details, diff]
cross compile patch #2

New version of the xcompile patch. This patch only patches
Replacing LDCONFIG="" with LDCONFIG="/bin/true" in the ebuild removes some
nonfatal error while building. I hope this is OK to commit.
Comment 5 Joakim Tjernlund 2006-09-21 16:08:58 UTC
Created attachment 97704 [details, diff]
cross compile patch #3

better patch per vapier suggestion
Comment 6 Joakim Tjernlund 2006-10-12 14:44:35 UTC
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-26 12:49:19 UTC
Can you see if 0.99 still has this problem?
Comment 8 Joakim Tjernlund 2006-11-08 13:20:54 UTC
(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.
Comment 9 Joel Martin (RETIRED) gentoo-dev 2006-11-16 13:52:40 UTC
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.
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-01-23 07:19:43 UTC
Joel, is better now? doc re-generation has stopped and we instead use upstream-provided documentation that should cover for it.
Comment 11 Joel Martin (RETIRED) gentoo-dev 2007-01-25 13:31:38 UTC
I just tried 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

Comment 12 Jakub Moc (RETIRED) gentoo-dev 2007-09-06 10:48:31 UTC
*** Bug 191478 has been marked as a duplicate of this bug. ***
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-11-04 15:41:56 UTC
Linux-PAM 0.78 is no more supported, so closing this bug down as CANTFIX.

If PAM or PAM does not crosscompile either, please open a new bug.