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

 
 

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

Submitter:  Jehan <jehan_zemarmot>
Submitted:  Wed 02 Oct 2013 06:27:00 AM UTC
   
 
Priority:  * 5 - Unprioritized Severity:  3 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

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 Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by eggert (Updated the item)
  • -email is unavailable- added by jehan_zemarmot (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-08-09 eggert StatusNone Done
        Open/ClosedOpen Closed
    2013-10-02 jehan_zemarmot Attached File- Added 0001-cross-compiling-handling-modern-platforms-able-to-ru.patch, #29281

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code