[Bug 723739] Re: Cannot cross compile 32-bit curl apps on x86_64

Charles Charles.Raymond at unilaterale.ca
Thu Jun 26 12:40:41 UTC 2014


https://sourceforge.net/p/curl/bugs/1385/

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to curl in Ubuntu.
https://bugs.launchpad.net/bugs/723739

Title:
  Cannot cross compile 32-bit curl apps on x86_64

Status in “curl” package in Ubuntu:
  Confirmed

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/curl/curl.h:35,
                   from ....:
  /usr/include/curl/curlrules.h:143: error: size of array '__curl_rule_01__' is negative
  /usr/include/curl/curlrules.h:153: error: size of array '__curl_rule_02__' is negative

  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/curl/curlbuild*
  /usr/include/curl/curlbuild-32.h /usr/include/curl/curlbuild-64.h /usr/include/curl/curlbuild.h

  $ cat /usr/include/curl/curlbuild.h
  #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://ubuntuforums.org/showthread.php?t=1680426

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/curl/+bug/723739/+subscriptions



More information about the foundations-bugs mailing list