Cannot cross compile 32-bit curl apps on x86_64
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://
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Mike Heffner for more information if necessary.