#10807 closed bug (no change required)
FetchFileJob.cpp does not cross-compile on Ubuntu 14.04
Reported by: | starsseed | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Build System | Version: | R1/Development |
Keywords: | curl | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
in ubuntu 14.04 libcurl4-openssl-dev, /usr/include/curl/curlbuild.h is different for x86 and X86_64
CURL_SIZEOF_LONG and CURL_SIZEOF_CURL_OFF_T are set to 4 for x86 and 8 for x86_64
https://bugs.launchpad.net/ubuntu/+source/curl/+bug/723739
generated/objects/linux/x86/release/tools/unzip/libunzip.a In file included from /usr/include/curl/curl.h:35:0, from src/kits/package/FetchFileJob.cpp:15: /usr/include/curl/curlrules.h:143:41: error: size of array ‘__curl_rule_01__’ is negative [CurlchkszEQ(long, CURL_SIZEOF_LONG)]; ^ /usr/include/curl/curlrules.h:153:53: error: size of array ‘__curl_rule_02__’ is negative [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];
Change History (13)
comment:1 by , 11 years ago
Component: | Kits/Package Kit → Build System |
---|---|
Keywords: | libunzip libcurl4-openssl-dev removed |
Resolution: | → no change required |
Status: | new → closed |
Summary: | [libunzip] does not cross-compile on X86_64 linux → FetchFileJob.cpp does not cross-compile on Ubuntu 14.04 |
follow-up: 3 comment:2 by , 11 years ago
Resolution: | no change required |
---|---|
Status: | closed → reopened |
I don't understand what you mean by "you should be able to easily work around by not forcing a 32-bit build" : Haiku *is* 32bit (and I'm not forcing anything : I just try to compile a standard gcc2-hybrid)
the problem is that the Haiku build system try to compile things with linux's headers instead of it's own.
comment:3 by , 11 years ago
Resolution: | → no change required |
---|---|
Status: | reopened → closed |
Replying to starsseed:
I don't understand what you mean by "you should be able to easily work around by not forcing a 32-bit build" : Haiku *is* 32bit (and I'm not forcing anything : I just try to compile a standard gcc2-hybrid)
So far you failed to write how you do that, particularly what arguments you pass to configure.
the problem is that the Haiku build system try to compile things with linux's headers instead of it's own.
No, that is not a problem. There are tools we build for the host platform, so we need to use the host platform's headers. You haven't even provided sufficient information on what fails exactly (if you don't know what you're doing, please always attach a complete build log), but I'm fairly confident that in this case compiling FetchFileJob.cpp fails for libpackage_build.
comment:4 by , 11 years ago
It currently works fine on the Mint LMDE (Debian testing) x86_64 buildslaves, so either you're doing something wrong, or Ubuntu has something different from Debian and Mint.
comment:5 by , 8 years ago
I have the same problem on Ubuntu 14.04, so either starsseed is not doing anything wrong, or we are both doing it :-)
comment:6 by , 8 years ago
Well, I didn't read the ticket correctly. Here it simply fails not finding curl.h, although it's there:
stefano@Mazinga:~$ dpkg -L libcurl4-openssl-dev | grep curl.h /usr/include/curl/curl.h
comment:7 by , 8 years ago
Error:
C++ /home/stefano/haiku/haiku/generated/objects/haiku/x86/release/kits/package/FetchFileJob.o src/kits/package/FetchFileJob.cpp:16:23: fatal error: curl/curl.h: No such file or directory compilation terminated.
job commandline:
/home/stefano/haiku/haiku/generated/cross-tools-x86/bin/i586-pc-haiku-gcc -c "src/kits/package/FetchFileJob.cpp" -O2 -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -Werror -Wno-error=uninitialized -Wno-error=maybe-uninitialized -Wno-unused-but-set-variable -fno-strict-aliasing -fno-tree-vrp -Wno-array-bounds -nostdinc -Wno-deprecated -DARCH_x86 -DB_USE_BUILTIN_ATOMIC_FUNCTIONS -D__HAIKU_PRIMARY_PACKAGING_ARCH=\"x86_gcc2\" -DHAIKU_DISTRO_COMPATIBILITY_DEFAULT -DHAIKU_INCLUDE_PATENTED_CODE=0 -DHAIKU_TARGET_PLATFORM_HAIKU -DHAIKU_REGULAR_BUILD -iquote /home/stefano/haiku/haiku/build/user_config_headers -iquote /home/stefano/haiku/haiku/build/config_headers -iquote src/kits/package -iquote /home/stefano/haiku/haiku/generated/objects/common/kits/package -iquote /home/stefano/haiku/haiku/generated/objects/linux/x86_64/common/kits/package -iquote /home/stefano/haiku/haiku/generated/objects/haiku/x86/common/kits/package -iquote /home/stefano/haiku/haiku/src/kits/package/hpkg -iquote /home/stefano/haiku/haiku/src/kits/package/hpkg/v1 -iquote /home/stefano/haiku/haiku/src/kits/package/manager -iquote /home/stefano/haiku/haiku/src/kits/package/solver -I /home/stefano/haiku/haiku/headers/private/app -I /home/stefano/haiku/haiku/headers/private/kernel -I /home/stefano/haiku/haiku/headers/private/shared -I /home/stefano/haiku/haiku/headers/private/storage -I /home/stefano/haiku/haiku/headers/private/support -I /home/stefano/haiku/haiku/headers/private/. -I /home/stefano/haiku/haiku/headers/private/system -I /home/stefano/haiku/haiku/headers/private/system/arch/x86 -I /home/stefano/haiku/haiku/generated/build_packages/curl_x86-7.45.0-2-x86_gcc2/develop/headers/x86 -I /home/stefano/haiku/haiku/generated/build_packages/curl_x86-7.45.0-2-x86_gcc2/develop/headers/x86/curl -I /home/stefano/haiku/haiku/generated/build_packages/gcc_x86_syslibs_devel-5.4.0_2016_06_04-1-x86_gcc2/develop/headers/x86/c++ -I /home/stefano/haiku/haiku/generated/build_packages/gcc_x86_syslibs_devel-5.4.0_2016_06_04-1-x86_gcc2/develop/headers/x86/c++/i586-pc-haiku -I /home/stefano/haiku/haiku/generated/build_packages/gcc_x86_syslibs_devel-5.4.0_2016_06_04-1-x86_gcc2/develop/headers/x86/c++/backward -I /home/stefano/haiku/haiku/generated/build_packages/gcc_x86_syslibs_devel-5.4.0_2016_06_04-1-x86_gcc2/develop/headers/x86/c++/ext -I /home/stefano/haiku/haiku/generated/build_packages/gcc_x86_syslibs_devel-5.4.0_2016_06_04-1-x86_gcc2/develop/headers/x86/gcc/include -I /home/stefano/haiku/haiku/generated/build_packages/gcc_x86_syslibs_devel-5.4.0_2016_06_04-1-x86_gcc2/develop/headers/x86/gcc/include-fixed -I /home/stefano/haiku/haiku/headers -I /home/stefano/haiku/haiku/headers/posix -I /home/stefano/haiku/haiku/headers/glibc -I /home/stefano/haiku/haiku/headers/os -I /home/stefano/haiku/haiku/headers/os/add-ons -I /home/stefano/haiku/haiku/headers/os/add-ons/file_system -I /home/stefano/haiku/haiku/headers/os/add-ons/graphics -I /home/stefano/haiku/haiku/headers/os/add-ons/input_server -I /home/stefano/haiku/haiku/headers/os/add-ons/registrar -I /home/stefano/haiku/haiku/headers/os/add-ons/screen_saver -I /home/stefano/haiku/haiku/headers/os/add-ons/tracker -I /home/stefano/haiku/haiku/headers/os/app -I /home/stefano/haiku/haiku/headers/os/device -I /home/stefano/haiku/haiku/headers/os/drivers -I /home/stefano/haiku/haiku/headers/os/game -I /home/stefano/haiku/haiku/headers/os/interface -I /home/stefano/haiku/haiku/headers/os/kernel -I /home/stefano/haiku/haiku/headers/os/locale -I /home/stefano/haiku/haiku/headers/os/media -I /home/stefano/haiku/haiku/headers/os/mail -I /home/stefano/haiku/haiku/headers/os/midi -I /home/stefano/haiku/haiku/headers/os/midi2 -I /home/stefano/haiku/haiku/headers/os/net -I /home/stefano/haiku/haiku/headers/os/storage -I /home/stefano/haiku/haiku/headers/os/support -I /home/stefano/haiku/haiku/headers/os/translation -I /home/stefano/haiku/haiku/headers/private/. -o "/home/stefano/haiku/haiku/generated/objects/haiku/x86/release/kits/package/FetchFileJob.o" ; ...failed C++ /home/stefano/haiku/haiku/generated/objects/haiku/x86/release/kits/package/FetchFileJob.o ...
Note that there is no /home/stefano/haiku/haiku/generated/build_packages/curl_x86-7.45.0-2-x86_gcc2/develop/headers/x86 directory. IOW: no libcurl headers in the cross compile directories.
comment:8 by , 8 years ago
More investigation:
Previous curl packages had the develop directory:
stefano@Mazinga:~/haiku/haiku$ ls generated/build_packages/curl_x86-7.44.0-1-x86_gcc2/ bin data develop documentation lib
stefano@Mazinga:~/haiku/haiku$ ls generated/build_packages/curl_x86-7.43.0-1-x86_gcc2/ bin data develop documentation lib
Current curl package doesn't have it: stefano@Mazinga:~/haiku/haiku$ ls generated/build_packages/curl_x86-7.45.0-2-x86_gcc2/ data lib
follow-up: 10 comment:9 by , 8 years ago
When you are compiling the building-tools for haiku (and not Haiku itself), you have to target your building platform (here, ubuntu)
If you have a 64bit Ubuntu and a 32bit GCC, you have to switch to a 64 bits GCC (no matter you want to compile haiku in 32-bit or in 64-bit.)
It fixed the build for me.
follow-up: 11 comment:10 by , 8 years ago
Replying to starsseed:
When you are compiling the building-tools for haiku (and not Haiku itself), you have to target your building platform (here, ubuntu)
So, do I have to specify some extra options on the "configure" commandline ? I did not target any specific platform and just leaved the default.
If you have a 64bit Ubuntu and a 32bit GCC, you have to switch to a 64 bits GCC (no matter you want to compile haiku in 32-bit or in 64-bit.)
You mean for the cross-compiler ? How do I check if the cross-compiler is 32 or 64 bit?
comment:11 by , 8 years ago
Replying to jackburton:
How do I check if the cross-compiler is 32 or 64 bit?
just check the installed packages from your package manager then, uninstall all gcc32 packages and (re)install standard GCC (or better: upgrade to 16.04 / just to feed the troll ;-) )
So, do I have to specify some extra options on the "configure" commandline ? I did not target any specific platform and just leaved the default.
(iirc) leave the default, Ubuntu will use the default compiler, however, don't forget to clean EVERYthing before.
follow-up: 13 comment:12 by , 8 years ago
@jackburton: your issue is different, since it is failing during build of the "target" version of the file. What could have happened is that download or extraction of the curl_devel package failed. Try deleting the generated/downloads and generated/build_packages dirs and running your build again (while connected to internet so the downloads can be done).
comment:13 by , 8 years ago
Replying to pulkomandy:
@jackburton: your issue is different, since it is failing during build of the "target" version of the file. What could have happened is that download or extraction of the curl_devel package failed. Try deleting the generated/downloads and generated/build_packages dirs and running your build again (while connected to internet so the downloads can be done).
That worked. For some reason I was sure I had already tried that. Thanks!
Similar to #10806. The bug is in Ubuntu and you should be able to easily work around by not forcing a 32-bit build.