Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

[PATCH Attachment 28632, Bug 51257] Build failed when cross-compiling: ./gen_test_char: cannot execute binary file

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


henrik.strand at axis

Apr 18, 2012, 12:55 AM

Post #1 of 10 (482 views)
Permalink
[PATCH Attachment 28632, Bug 51257] Build failed when cross-compiling: ./gen_test_char: cannot execute binary file

Hi,

I've just added a patch for
https://issues.apache.org/bugzilla/show_bug.cgi?id=51257

Does my company need to sign some kind of legal contract in order for
you to use the patch?

Kind Regards,
Henrik


fuankg at apache

Apr 18, 2012, 8:36 AM

Post #2 of 10 (465 views)
Permalink
Re: [PATCH Attachment 28632, Bug 51257] Build failed when cross-compiling: ./gen_test_char: cannot execute binary file [In reply to]

Hi Henrik,
Am 18.04.2012 09:55, schrieb Henrik Strand:
> I've just added a patch for
> https://issues.apache.org/bugzilla/show_bug.cgi?id=51257
>
> Does my company need to sign some kind of legal contract in order for
> you to use the patch?
I dont think so since the patch is small.

However I'm not fine with this patch; its only another hack which might
work, but IMO is the wrong approach. We need someone beeing good with
configure writing and then implement it the usual way so that --host
works (which I just tested and at least with 2.22 it does not work:
configure accepts it and makes all tests with the prefix, but finally
make uses unprefixed gcc). When we are going to fix this it should be
this way as configure is designed for, and not just another hack.

Gün.


henrik.strand at axis

Apr 19, 2012, 1:39 AM

Post #3 of 10 (465 views)
Permalink
Re: [PATCH Attachment 28632, Bug 51257] Build failed when cross-compiling: ./gen_test_char: cannot execute binary file [In reply to]

Hi again Guenter,

I based the patch on the old 2003 patch
(http://marc.info/?l=apache-httpd-dev&m=106150997309208&w=2) that you
said looked harmless.

Anyhow, exactly how do you want it to be solved? Since I have not worked
with configure scripts before all help is appreciated

Kind Regards,
Henrik

On Wed, 2012-04-18 at 17:36 +0200, Guenter Knauf wrote:
> Hi Henrik,
> Am 18.04.2012 09:55, schrieb Henrik Strand:
> > I've just added a patch for
> > https://issues.apache.org/bugzilla/show_bug.cgi?id=51257
> >
> > Does my company need to sign some kind of legal contract in order for
> > you to use the patch?
> I dont think so since the patch is small.
>
> However I'm not fine with this patch; its only another hack which might
> work, but IMO is the wrong approach. We need someone beeing good with
> configure writing and then implement it the usual way so that --host
> works (which I just tested and at least with 2.22 it does not work:
> configure accepts it and makes all tests with the prefix, but finally
> make uses unprefixed gcc). When we are going to fix this it should be
> this way as configure is designed for, and not just another hack.
>
> Gün.
>
>


fuankg at apache

Apr 19, 2012, 4:25 AM

Post #4 of 10 (462 views)
Permalink
Re: [PATCH Attachment 28632, Bug 51257] Build failed when cross-compiling: ./gen_test_char: cannot execute binary file [In reply to]

Hi Henrik,
Am 19.04.2012 10:39, schrieb Henrik Strand:
> I based the patch on the old 2003 patch
> (http://marc.info/?l=apache-httpd-dev&m=106150997309208&w=2) that you
> said looked harmless.
>
> Anyhow, exactly how do you want it to be solved? Since I have not worked
> with configure scripts before all help is appreciated
I've now spent 2 hours with trying to figure out from where all vars
come ..., and its configure hell :-)
I admit that my knowledge about configure is also really limited ...
I'm just trying to do something link that:
export CC_FOR_BUILD=gcc
and then test for this in the makefiles; its my hope that we might get
CC_FOR_BUILD finally automatically populated by configure ...
so I'd say lets use CC_FOR_BUILD so that once we've figured out how to
teach configure to set this var we dont need to change the makefiles
again ...
I'm currently trying with 2.2.22 (sure the patch has finally to go into
trunk 1st) because thats ATM easier for my cross-compile testing
(apr/apu/pcre included)
If it works what I'm testing I will attach an updated patch to your bug.

greets, Gün.


henrik.strand at axis

Apr 20, 2012, 5:59 AM

Post #5 of 10 (457 views)
Permalink
Re: [PATCH Attachment 28632, Bug 51257] Build failed when cross-compiling: ./gen_test_char: cannot execute binary file [In reply to]

Hi Guenter,

I've applied and tried the modified patch
(http://svn.apache.org/viewvc?view=revision&revision=1327907) but it
seems that the BUILD_FOR_CC value isn't propagated to the Makefile in
the server folder.

Did it work for you? If so, what more did you have to do in order to get
it to work?

Kind Regards,
Henrik

On Thu, 2012-04-19 at 13:25 +0200, Guenter Knauf wrote:
> Hi Henrik,
> Am 19.04.2012 10:39, schrieb Henrik Strand:
> > I based the patch on the old 2003 patch
> > (http://marc.info/?l=apache-httpd-dev&m=106150997309208&w=2) that you
> > said looked harmless.
> >
> > Anyhow, exactly how do you want it to be solved? Since I have not worked
> > with configure scripts before all help is appreciated
> I've now spent 2 hours with trying to figure out from where all vars
> come ..., and its configure hell :-)
> I admit that my knowledge about configure is also really limited ...
> I'm just trying to do something link that:
> export CC_FOR_BUILD=gcc
> and then test for this in the makefiles; its my hope that we might get
> CC_FOR_BUILD finally automatically populated by configure ...
> so I'd say lets use CC_FOR_BUILD so that once we've figured out how to
> teach configure to set this var we dont need to change the makefiles
> again ...
> I'm currently trying with 2.2.22 (sure the patch has finally to go into
> trunk 1st) because thats ATM easier for my cross-compile testing
> (apr/apu/pcre included)
> If it works what I'm testing I will attach an updated patch to your bug.
>
> greets, Gün.
>
>


fuankg at apache

Apr 20, 2012, 8:11 AM

Post #6 of 10 (460 views)
Permalink
Re: [PATCH Attachment 28632, Bug 51257] Build failed when cross-compiling: ./gen_test_char: cannot execute binary file [In reply to]

Hi Henrik,
Am 20.04.2012 14:59, schrieb Henrik Strand:
> I've applied and tried the modified patch
> (http://svn.apache.org/viewvc?view=revision&revision=1327907) but it
> seems that the BUILD_FOR_CC value isn't propagated to the Makefile in
> the server folder.
>
> Did it work for you? If so, what more did you have to do in order to get
> it to work?
I've just committed a follow-up patch:
http://svn.apache.org/viewvc?view=revision&revision=1328390
it is *required* that you re-run buildconf so that configure gets
re-created! After you've run configure with f.e.:
CC_FOR_BUILD=gcc ./configure --host=...
you can check ./build/config_vars.mk where CC_FOR_BUILD should appear
now and ./server/Makefile should now see the var ...
please check and report back!

Now I would finally like to see that configure sets self CC_FOR_BUILD
when --host is specified ...
Anybody who can help with this??
I see that CC_FOR_BUILD appears already in config.guess ...
Any help with this appreaciated!

Thanks, Gün.


henrik.strand at axis

Apr 23, 2012, 7:33 AM

Post #7 of 10 (449 views)
Permalink
Re: [PATCH Attachment 28632, Bug 51257] Build failed when cross-compiling: ./gen_test_char: cannot execute binary file [In reply to]

Hi Guenter,

Some initial thoughts on your patch:

- Why not init CC_FOR_BUILD to $(CC) instead of cc?

- Good thing with CFLAGS_FOR_BUILD but default init is missing. Default
to CFLAGS?

- Documentation?


Kind Regards,
Henrik

On Fri, 2012-04-20 at 17:11 +0200, Guenter Knauf wrote:
> Hi Henrik,
> Am 20.04.2012 14:59, schrieb Henrik Strand:
> > I've applied and tried the modified patch
> > (http://svn.apache.org/viewvc?view=revision&revision=1327907) but it
> > seems that the BUILD_FOR_CC value isn't propagated to the Makefile in
> > the server folder.
> >
> > Did it work for you? If so, what more did you have to do in order to get
> > it to work?
> I've just committed a follow-up patch:
> http://svn.apache.org/viewvc?view=revision&revision=1328390
> it is *required* that you re-run buildconf so that configure gets
> re-created! After you've run configure with f.e.:
> CC_FOR_BUILD=gcc ./configure --host=...
> you can check ./build/config_vars.mk where CC_FOR_BUILD should appear
> now and ./server/Makefile should now see the var ...
> please check and report back!
>
> Now I would finally like to see that configure sets self CC_FOR_BUILD
> when --host is specified ...
> Anybody who can help with this??
> I see that CC_FOR_BUILD appears already in config.guess ...
> Any help with this appreaciated!
>
> Thanks, Gün.
>
>


fuankg at apache

Apr 23, 2012, 7:58 AM

Post #8 of 10 (450 views)
Permalink
Re: [PATCH Attachment 28632, Bug 51257] Build failed when cross-compiling: ./gen_test_char: cannot execute binary file [In reply to]

Hi Henrik,
Am 23.04.2012 16:33, schrieb Henrik Strand:
> Some initial thoughts on your patch:
>
> - Why not init CC_FOR_BUILD to $(CC) instead of cc?
because $(CC) holds the cross compiler (host) and not the build
compiler; 'cc' should work on almost all systems, and if it doesnt one
can still overwrite it with the env var, see below.

> - Good thing with CFLAGS_FOR_BUILD but default init is missing. Default
> to CFLAGS?
no - for same reason as above: CFLAGS holds flags for host, and not for
build.

> - Documentation?
yes, are you up to adapt your docu patch to the new behaviour?
This is:
when cross compilation is detected then CC_FOR_BUILD will be set to 'cc'
so that the build helper gen_test_char will be build with the build
compiler and can then be run on the build system. You can overwrite 'cc'
with setting the environment var CC_FOR_BUILD, f.e.:
CC_FOR_BUILD=gcc ./configure --host=...

Gün.


henrik.strand at axis

Apr 25, 2012, 5:16 AM

Post #9 of 10 (442 views)
Permalink
Re: [PATCH Attachment 28632, Bug 51257] Build failed when cross-compiling: ./gen_test_char: cannot execute binary file [In reply to]

Done.

Kind Regards,
Henrik

On Mon, 2012-04-23 at 16:58 +0200, Guenter Knauf wrote:
> Hi Henrik,
> Am 23.04.2012 16:33, schrieb Henrik Strand:
> > Some initial thoughts on your patch:
> >
> > - Why not init CC_FOR_BUILD to $(CC) instead of cc?
> because $(CC) holds the cross compiler (host) and not the build
> compiler; 'cc' should work on almost all systems, and if it doesnt one
> can still overwrite it with the env var, see below.
>
> > - Good thing with CFLAGS_FOR_BUILD but default init is missing. Default
> > to CFLAGS?
> no - for same reason as above: CFLAGS holds flags for host, and not for
> build.
>
> > - Documentation?
> yes, are you up to adapt your docu patch to the new behaviour?
> This is:
> when cross compilation is detected then CC_FOR_BUILD will be set to 'cc'
> so that the build helper gen_test_char will be build with the build
> compiler and can then be run on the build system. You can overwrite 'cc'
> with setting the environment var CC_FOR_BUILD, f.e.:
> CC_FOR_BUILD=gcc ./configure --host=...
>
> Gün.
>
>


fuankg at apache

Apr 26, 2012, 5:14 AM

Post #10 of 10 (441 views)
Permalink
Re: [PATCH Attachment 28632, Bug 51257] Build failed when cross-compiling: ./gen_test_char: cannot execute binary file [In reply to]

Hi Henrik,
Am 25.04.2012 14:16, schrieb Henrik Strand:
> Done.
thanks!

Gün.

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.