helpAutoconf - Support: sr #108405, False negative for...

 
 

sr #108405: False negative for $cross_compiling when cross-compiling on Linux for Windows.

Submitted by:  Jehan <jehan_zemarmot>
Submitted on:  Wed 02 Oct 2013 06:27:00 AM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 02 Oct 2013 06:27:00 AM UTC, original submission:

If --host is set, and --build is not set, the current autoconf would make a test program run and if it succeeds, it considers we are not cross-compiling.

Well this fails on a Linux mint with Wine installed by default (and probably Ubuntu, and likely even any Debian and derivative). Indeed by default, Wine would automatically handle any Windows executable (without the user even asking explicitly). I have done the test by copying the conftest.exe generated by autoconf and running "./conftest.exe", and... it succeeds without an error and with $? = 0.

The workaround to this right now is to run as a super-user:
$ update-binfmts --disable wine

Or else to specify both --host and --build in the ./configure line, but I find this being really inconvenient, whereas config.guess works awesomely well to do this job. And this is just a relics from the past, in my opinion.

Anyway I believe Debian and derivative are quite common nowadays, and this makes this false negative $cross_compiling quite annoying.

Of course it could be argued that if Wine were able to perform all the tests, this is all just good. But actually Wine often fails to perform more complicated tests (for instance I discovered this issue when compiling GTK+, and it passed the basic cross-compiling test, but not the bigger glib-test), and also the value of $cross_compiling is often tested for other usage in projects' configure.ac and Makefile.am (for instance in GTK+, once again).

So I propose the attached patch. Basically if --host is set, but not --build, once the the finale $host and $build values are set, processed and modified by config.guess and config.sub, we check if there are any different, and we don't make the run test in this specific case because its result may not be relevant to tell whether we are really cross-compiling.

Jehan <jehan_zemarmot>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jehan_zemarmot (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 02 Oct 2013 06:27:00 AM UTCjehan_zemarmotAttached File-=>Added 0001-cross-compiling-handling-modern-platforms-able-to-ru.patch, #29281

    Back to the top


    Powered by Savane 3.1-cleanup