Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266570 - net-dns/bind-tools-9.4.3_p2: fix cross-compilation
Summary: net-dns/bind-tools-9.4.3_p2: fix cross-compilation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: BIND Maintainers (DISABLED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-17 19:28 UTC by Bertrand Jacquin
Modified: 2011-06-02 10:54 UTC (History)
0 users

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


Attachments
bind-tools-BJA-epoll-AC_TRY_RUN-cross.diff (bind-tools-BJA-epoll-AC_TRY_RUN-cross.diff,754 bytes, patch)
2009-04-17 19:30 UTC, Bertrand Jacquin
Details | Diff
Use HOSTCC to build gen (bind-tools-BJA-gen-HOSTCC.diff,411 bytes, patch)
2009-04-17 19:30 UTC, Bertrand Jacquin
Details | Diff
net-dns/bind-tools-9.4.3_p2.ebuild (bind-tools-9.4.3_p2.diff,431 bytes, patch)
2009-04-17 19:31 UTC, Bertrand Jacquin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2009-04-17 19:28:54 UTC
In bind-tools ebuild, configure is not generated from configure.in which is wrong when searching for epoll when cross-compiling. So bind-tools-BJA-epoll-AC_TRY_RUN-cross.diff correct that to not do a non-conditional fail if cross-compiling.

Then "gen" is compiled for many purposes in build. This binary is build with destination toolchain, do can't be executed on host. bind-tools-BJA-gen-HOSTCC.diff correct that.

Reproducible: Always

Steps to Reproduce:
1. crossdev -t i586-geode-linux-uclibc
2. emerge-wrapper --init
3. i586-geode-linux-uclibc -vat bind-tools
Comment 1 Bertrand Jacquin 2009-04-17 19:30:24 UTC
Created attachment 188713 [details, diff]
bind-tools-BJA-epoll-AC_TRY_RUN-cross.diff
Comment 2 Bertrand Jacquin 2009-04-17 19:30:54 UTC
Created attachment 188715 [details, diff]
Use HOSTCC to build gen
Comment 3 Bertrand Jacquin 2009-04-17 19:31:32 UTC
Created attachment 188717 [details, diff]
net-dns/bind-tools-9.4.3_p2.ebuild
Comment 4 Bertrand Jacquin 2009-04-17 20:42:21 UTC
patch have been reported upstream : https://lists.isc.org/pipermail/bind-workers/2009-April/002780.html
Comment 5 Bertrand Jacquin 2009-04-21 22:13:32 UTC
Patch for configure.in (not present here as configure is used as is, but send upsteam) have been integrated upstream :

https://lists.isc.org/pipermail/bind-workers/2009-April/002784.html
Comment 6 Tomáš Chvátal (RETIRED) gentoo-dev 2009-11-12 08:25:58 UTC
Hi,
From what i can see only the second patch is required for building crosscompiled bind 9.6.1, could you please confirm? :]
Comment 7 Bertrand Jacquin 2009-11-13 11:47:56 UTC
Exact, first one have been included upstream : 

https://lists.isc.org/pipermail/bind-workers/2009-April/002784.html
Comment 8 Christian Ruppert (idl0r) gentoo-dev 2010-06-03 17:32:03 UTC
Reading the build system files I tend to say using CC_FOR_BUILD is better than using HOST_CC.
Do you agree?
Comment 9 Christian Ruppert (idl0r) gentoo-dev 2010-06-03 17:33:19 UTC
Btw. can you please test more recent versions too?
I also think that net-dns/bind is also affected by this bug.
Comment 10 Bertrand Jacquin 2010-06-12 19:23:47 UTC
I need to do some tests with more recent release.

I don't need bind package but you're right, bind also apply in this bug report.

Also, CC_FOR_BUILD is used to build destination binary, not strictly host binary like "gen" which is used and executed in building process

Bertrand
Comment 11 Christian Ruppert (idl0r) gentoo-dev 2010-06-12 21:15:49 UTC
Its just that I didn't saw HOST_CC there so I wonder how/where it will be defined?
Comment 12 Triffid Hunter 2010-09-28 23:50:17 UTC
this affects bind-tools-9.7.1. attached patches allow compilation with some rewriting to account for altered files
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-06-02 10:31:19 UTC
For the record, CC_FOR_BUILD is the CC for ${CBUILD} handling, which is what should be used for tools then used during build.
Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-06-02 10:34:56 UTC
The AC_TRY_RUN can be avoided, at least as of 9.8.0-P1, by adding this to econf call

$(use_enable kernel_linux epoll)

which avoids running it in "auto" mode.
Comment 15 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-06-02 10:38:21 UTC
And BUILD_CC should be exported as $(tc-getCC_FOR_BUILD)
Comment 16 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-06-02 10:54:34 UTC
Okay I fixed this one at least partially. USE=ssl fails because of another AC_TRY_RUN call, but I'll see to write some documentation about AC_TRY_RUN, so that I can tell upstream how to fix this.