Opened 6 months ago
Closed 2 months ago
#18935 closed bug (fixed)
Build broken on 32bit (R1B4)
Reported by: | Begasus | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta6 |
Component: | Build System | Version: | R1/beta4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
Trying out a fix for a reported crash I was not able to build Haiku on 32bit, build failure with QueryParser.h probably related to https://dev.haiku-os.org/ticket/18692
Attachments (1)
Change History (17)
by , 6 months ago
Attachment: | build_error_32bit.txt added |
---|
comment:1 by , 6 months ago
Related ticket trying to solve: https://dev.haiku-os.org/ticket/18931 On 64bit (R1B4) this works fine without errors.
comment:2 by , 6 months ago
Description: | modified (diff) |
---|
comment:3 by , 5 months ago
Resolution: | → no change required |
---|---|
Status: | new → closed |
Seems the query parser can't be built with GCC2 anymore. The initial errors are easy to fix, but eventually we run into this, which isn't so fixable:
C++ generated/objects/haiku_host/x86_gcc2/release/tools/bfs_shell/Query.o /boot/home/Desktop/haiku/headers/private/file_systems/QueryParser.h: In method `fssh_status_t QueryParser::Expression<Query::QueryPolicy>::Init(const char *, const char **)': headers/private/file_systems/QueryParser.h:1454: instantiated from `QueryParser::Query<Query::QueryPolicy>::Create(Query *, const char *, unsigned int, int, unsigned int, QueryParser::Query<Query::QueryPolicy> *&)' src/add-ons/kernel/file_systems/bfs/Query.cpp:348: instantiated from here /boot/home/Desktop/haiku/headers/private/file_systems/QueryParser.h:1198: template-argument `QueryParser::Expression<Query::QueryPolicy>::Init(const char *, const char **)::ExpressionNode' uses local type `QueryParser::Expression<Query::QueryPolicy>::Init(const char *, const char **)::ExpressionNode' /boot/home/Desktop/haiku/headers/private/file_systems/QueryParser.h:1198: template argument 1 is invalid /boot/home/Desktop/haiku/headers/private/file_systems/QueryParser.h:1199: template-argument `QueryParser::Expression<Query::QueryPolicy>::Init(const char *, const char **)::ExpressionNode' uses local type `QueryParser::Expression<Query::QueryPolicy>::Init(const char *, const char **)::ExpressionNode' /boot/home/Desktop/haiku/headers/private/file_systems/QueryParser.h:1199: assignment (not initialization) in declaration /boot/home/Desktop/haiku/headers/private/file_systems/QueryParser.h:1204: `currentExpr' undeclared (first use this function) /boot/home/Desktop/haiku/headers/private/file_systems/QueryParser.h:1204: (Each undeclared identifier is reported only once /boot/home/Desktop/haiku/headers/private/file_systems/QueryParser.h:1204: for each function it appears in.) /boot/home/Desktop/haiku/headers/private/file_systems/QueryParser.h:1205: template-argument `QueryParser::Expression<Query::QueryPolicy>::Init(const char *, const char **)::ExpressionNode' uses local type `QueryParser::Expression<Query::QueryPolicy>::Init(const char *, const char **)::ExpressionNode' headers/private/file_systems/QueryParser.h:1454: instantiated from `QueryParser::Query<Query::QueryPolicy>::Create(Query *, const char *, unsigned int, int, unsigned int, QueryParser::Query<Query::QueryPolicy> *&)' src/add-ons/kernel/file_systems/bfs/Query.cpp:348: instantiated from here /boot/home/Desktop/haiku/headers/private/file_systems/QueryParser.h:1228: `exprsTree' undeclared (first use this function)
It's probably best if we just use the modern GCC to build the host tools at this point. Like this:
CC=gcc-x86 ./configure
comment:4 by , 5 months ago
Resolution: | no change required |
---|---|
Status: | closed → reopened |
If we don't support GCC2 anymore as host compiler, then the configure script or build/jam/BuildSetup should at least make it clear.
if $(HOST_CC_IS_LEGACY_GCC) = 1 { Exit "Legacy host compiler not supported." ; }
comment:5 by , 5 months ago
And documentation on building Haiku should be updated accordingly.
Or maybe the configure script can automatically detect this case and use gcc-x86 transparently?
comment:6 by , 5 months ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Done in hrev57874.
I didn't want to hardcode "gcc-x86" in the configure script, it's easy enough to specify manually.
comment:7 by , 5 months ago
I didn't try, but does it mean devel:libzstd_x86 is now needed on Haiku x86 (instead of devel:libzstd) ?
https://github.com/haiku/website/blob/master/content/guides/building/pre-reqs.md?plain=1#L113
comment:9 by , 5 months ago
Adjusted the prereqs in https://github.com/haiku/website/commit/16c063c36e1569fa6a6753fb0ea7ae6d56d1b061
comment:10 by , 5 months ago
Did a quick check but got another failure, do I need to run a "jam clean" or anything else?
...found 159187 target(s)... ...updating 15206 target(s)... C++ objects/haiku_host/x86/release/build/libroot/atomic.o C++ objects/haiku_host/x86/release/build/libroot/find_directory.o C++ objects/haiku_host/x86/release/build/libroot/fs.o C++ objects/haiku_host/x86/release/build/libroot/fs_attr.o C++ objects/haiku_host/x86/release/build/libroot/fs_descriptors.o C++ objects/haiku_host/x86/release/build/libroot/misc.o C++ objects/haiku_host/x86/release/build/libroot/sem.o C++ objects/haiku_host/x86/release/build/libroot/thread.o C++ objects/haiku_host/x86/release/build/libroot/driver_settings.o C++ objects/haiku_host/x86/release/build/libroot/KMessage.o C++ objects/haiku_host/x86/release/tools/copyattr.o C++ objects/haiku_host/x86/release/build/libbe/app/Application.o C++ objects/haiku_host/x86/release/build/libbe/app/AppMisc.o C++ objects/haiku_host/x86/release/build/libbe/app/Looper.o Link /Share/Haiku/haiku/generated/objects/haiku_host/lib/libroot_build.so C++ objects/haiku_host/x86/release/build/libbe/app/Message.o /packages/gcc-2.95.3_2023_08_05-1/.self/develop/tools/i586-pc-haiku/bin/ld: unrecognized option '--copy-dt-needed-entries' /packages/gcc-2.95.3_2023_08_05-1/.self/develop/tools/i586-pc-haiku/bin/ld: use the --help option for usage information collect2: ld returned 1 exit status C++ objects/haiku_host/x86/release/build/libbe/app/MessageAdapter.o gcc -Xlinker --no-as-needed -Wl,--copy-dt-needed-entries -Wl,-rpath,/Share/Haiku/haiku/generated/objects/haiku_host/lib -lbsd -shared -Xlinker -soname="libroot_build.so" -o "/Share/Haiku/haiku/generated/objects/haiku_host/lib/libroot_build.so" "objects/haiku_host/x86/release/build/libroot/atomic.o" "objects/haiku_host/x86/release/build/libroot/byteorder.o" "objects/haiku_host/x86/release/build/libroot/errors.o" "objects/haiku_host/x86/release/build/libroot/find_directory.o" "objects/haiku_host/x86/release/build/libroot/fs.o" "objects/haiku_host/x86/release/build/libroot/fs_attr.o" "objects/haiku_host/x86/release/build/libroot/fs_descriptors.o" "objects/haiku_host/x86/release/build/libroot/misc.o" "objects/haiku_host/x86/release/build/libroot/sem.o" "objects/haiku_host/x86/release/build/libroot/thread.o" "objects/haiku_host/x86/release/build/libroot/SHA256.o" "objects/haiku_host/x86/release/build/libroot/driver_settings.o" "objects/haiku_host/x86/release/build/libroot/strnlen.o" "objects/haiku_host/x86/release/build/libroot/KMessage.o" \ -lsupc++ -lstdc++ \ ...failed Link /Share/Haiku/haiku/generated/objects/haiku_host/lib/libroot_build.so ... MergeObjectFromObjects1 objects/haiku_host/x86/release/build/libbe/app/app_kit.o
comment:11 by , 5 months ago
Strike the above, using "CC=gcc-x86 ../configure --distro-compatibility official" launched the build, getting other "undefined reference" errors now like:
/boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/13.3.0/../../../../i586-pc-haiku/bin/ld: error in objects/haiku_host/x86/release/tools/copyattr.o(.eh_frame); no .eh_frame_hdr table will be created /boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/13.3.0/../../../../i586-pc-haiku/bin/ld: objects/haiku_host/x86/release/tools/copyattr.o: in function `copy_attributes__FPCcR5BNodeT0T1RC10Parameters': copyattr.cpp:(.text+0x19a): undefined reference to `GetAttrInfo__C5BNodePCcP9attr_info' /boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/13.3.0/../../../../i586-pc-haiku/bin/ld: copyattr.cpp:(.text+0x2a8): undefined reference to `ReadAttr__C5BNodePCcUlxPvUl' /boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/13.3.0/../../../../i586-pc-haiku/bin/ld: copyattr.cpp:(.text+0x326): undefined reference to `WriteAttr__5BNodePCcUlxPCvUl' /boot/system/develop/tools/x86/bin/../lib/gcc/i586-pc-haiku/13.3.0/../../../../i586-pc-haiku/bin/ld: copyattr.cpp:(.text+0x3c2): undefined reference to `GetNextAttrName__5BNodePc'
comment:12 by , 5 months ago
OK, this seems fixed, got another error now, will file a new ticket for that. Thanks!
comment:13 by , 3 months ago
Here just to say that IMO, it would be better if it just used CC=gcc-x86 by default when running on Haiku 32 bits.
comment:14 by , 3 months ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Yes, it should, currently the configure script is not doing itws job if you need to do the configuration manually...
comment:16 by , 2 months ago
Milestone: | Unscheduled → R1/beta6 |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Fix merged in hrev58286.
Terminal output for the error