Cannot cross compile 32-bit curl apps on x86_64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curl (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Cross compiling (-m32) a 32-bit application that relies on libcurl in a 64-bit host fails with:
In file included from /usr/include/
/usr/include/
/usr/include/
This is due to libcurl's installation of a generated, architecture dependent, header file "curlbuild.h". Design decisions aside, I think the package should handle this so the user doesn't have to install a parallel installation of 32-bit libcurl to cross-compile curl apps.
One possible solution is to the use approach Fedora takes and install both curlbuild.h's side-by-side and switch on __WORDSIZE:
$ ls /usr/include/
/usr/include/
$ cat /usr/include/
#include <bits/wordsize.h>
#if __WORDSIZE == 32
#include "curlbuild-32.h"
#elif __WORDSIZE == 64
#include "curlbuild-64.h"
#else
#error "Unknown word size"
#endif
There is also a forum thread discussing this same issue: http://
affects: | ubuntu → curl (Ubuntu) |
Status changed to 'Confirmed' because the bug affects multiple users.