Opened 9 years ago
Closed 9 years ago
#12178 closed bug (invalid)
Header error in support/Archivable.h
Reported by: | haiqu | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | - General | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
support/Archivable.h calls <image.h>
This isn't found, since the directory it lives in isn't in the header path.
Should be <kernel/image.h>
This header is required fpor the definition of image_id in the following line:
BArchivable* instantiate_object(BMessage* from, image_id* id);
Change History (7)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Ah, I see you've discovered my secret. :-)
I was building q4wine which uses cmake
. Evidently it doesn't use BEINCLUDES or any other environment variables. I hate cmake
.
comment:3 by , 9 years ago
Here's the actual error:
In file included from /boot/system/develop/headers/os/interface/Gradient.h:9:0, from /boot/home/gui/qt-4.8.7/include/QtGui/qwindowdefs_haiku.h:58, from /boot/home/gui/qt-4.8.7/include/QtGui/qwindowdefs.h:146, from /boot/home/gui/qt-4.8.7/include/QtGui/qwidget.h:46, from /boot/home/gui/qt-4.8.7/include/QtGui/qdialog.h:45, from /boot/home/gui/qt-4.8.7/include/QtGui/qmessagebox.h:45, from /boot/home/gui/qt-4.8.7/include/QtGui/QMessageBox:1, from /Work/gui/q4wine/src/q4wine-lib/q4wine-lib.h:35, from /Work/gui/q4wine/src/q4wine-lib/q4wine-lib.cpp:19: /boot/system/develop/headers/os/support/Archivable.h:160:49: error: 'image_id' has not been declared BArchivable* instantiate_object(BMessage* from, image_id* id); ^
Tested with cmake 2.8.12 & cmake 3.2.3_x86 and I note that they DO both have a path to the kernel headers directory included in the patch file.
comment:4 by , 9 years ago
You think that it doesn't find <image.h>. In that case, the build would fail with such an error (or it does, but you fail to include a complete log). So this means it found another image.h to include.
Please include the full gcc build command. You can also try to dump the preprocessing replacing "-c" with "-E". This should help you to find out what happens.
follow-up: 6 comment:5 by , 9 years ago
No, I *know* it doesn't find <image.h> because that's where image_id is defined.
I also know this because adding
#include <kernel/image.h>
to include/QtGui/qwindowdefs_haiku.h (or changing it in support/Archivable.h and rebuilding the system) fixes the issue. However I shouldn't have to do that if cmake is capable of finding it. Which it isn't, in this situation.
Currently the headers are very gnu-centric and rely on environment variables. Not all build systems work that way.
comment:6 by , 9 years ago
Replying to haiqu:
No, I *know* it doesn't find <image.h> because that's where image_id is defined.
You don't seem to understand my point. It does find a image.h, but not the one you think, because otherwise it would fail with "image.h not found".
comment:7 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
In any case, this is a build issue outside of Haiku. You need to change the your build so that it will find the right header.
Can you please give more info? The public "kernel" headers are definitely in the standard search path. You must be doing something weird :-)