Closed
Bug 454841
Opened 17 years ago
Closed 17 years ago
glib.h not found when building qt-cairo backend without --disable-elf-dynstr-gc
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9.1b1
People
(Reporter: tonikitoo, Assigned: tonikitoo)
Details
Attachments
(1 file, 1 obsolete file)
|
651 bytes,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
* if building with qt-cairo backend, some glib bits are still needed by elf-dynstr-gc.c ...
see http://mxr.mozilla.org/mozilla-central/source/config/elf-dynstr-gc.c#57
* in this case, GLIB_CFLAGS/LIBS are empty in config/autoconf.mk .
* adding --disable-elf-dynstr-gc avoids that problem ... but might be not ideal solution.
*********************
error output:
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:57:18: error: glib.h: No such file or directory
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c: In function ‘read_word’:
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:88: warning: implicit declaration of function ‘GUINT32_SWAP_LE_BE’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c: In function ‘read_sword’:
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:96: error: ‘guint32’ undeclared (first use in this function)
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:96: error: (Each undeclared identifier is reported only once
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:96: error: for each function it appears in.)
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:96: error: expected ‘)’ before ‘w’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c: In function ‘read_half’:
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:112: warning: implicit declaration of function ‘GUINT16_SWAP_LE_BE’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c: In function ‘possibly_add_string’:
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:369: warning: implicit declaration of function ‘g_hash_table_lookup’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:369: error: ‘used_dynamic_symbols’ undeclared (first use in this function)
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:369: error: ‘gpointer’ undeclared (first use in this function)
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:369: error: expected ‘)’ before ‘name_idx’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:369: warning: assignment makes pointer from integer without a cast
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:373: warning: implicit declaration of function ‘g_new’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:373: error: expected expression before ‘struct’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:373: warning: assignment makes pointer from integer without a cast
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:377: warning: implicit declaration of function ‘g_strdup’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:377: warning: assignment makes pointer from integer without a cast
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:379: warning: implicit declaration of function ‘g_hash_table_insert’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:379: error: expected ‘)’ before ‘name_idx’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c: In function ‘fixup_string’:
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:393: error: ‘used_dynamic_symbols’ undeclared (first use in this function)
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:393: error: ‘gpointer’ undeclared (first use in this function)
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:393: error: expected ‘)’ before ‘old_idx’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:393: warning: assignment makes pointer from integer without a cast
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c: At top level:
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:626: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘sum_size’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:639: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘output_string’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c: In function ‘generate_new_dynstr’:
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:658: warning: implicit declaration of function ‘g_hash_table_foreach’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:658: error: ‘used_dynamic_symbols’ undeclared (first use in this function)
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:659: error: ‘GHFunc’ undeclared (first use in this function)
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:659: error: expected ‘)’ before ‘sum_size’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:663: warning: implicit declaration of function ‘g_malloc’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:663: warning: assignment makes pointer from integer without a cast
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:669: error: expected ‘)’ before ‘output_string’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c: In function ‘main’:
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:1115: error: ‘used_dynamic_symbols’ undeclared (first use in this function)
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:1115: warning: implicit declaration of function ‘g_hash_table_new’
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:1115: error: ‘g_direct_hash’ undeclared (first use in this function)
/scratchbox/users/agomes/home/agomes/osso/projects/mozilla-central/config/elf-dynstr-gc.c:1115: error: ‘g_direct_equal’ undeclared (first use in this function)
make[5]: *** [elf-dynstr-gc] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [export_tier_base] Error 2
make[3]: *** [tier_base] Error 2
make[2]: *** [default] Error 2
make[1]: *** [build] Error 2
make: *** [build] Error 2
| Assignee | ||
Comment 1•17 years ago
|
||
Suppose I am building mozilla-qt (cairo-qt) and I want elf-dynstr_gc enabled in my build.
Right now , if we build mozilla-qt, glib is disable (it build only with toolkit=cairo-gtk2). There are some (e.g. elf-dynstr_gc) that want to used glib only, not gtk2.
patch makes that possible by add a --enable-glib options, and changes elf-dynstr_gc accordingly.
Assignee: nobody → tonikitoo
Status: NEW → ASSIGNED
Attachment #339439 -
Flags: review?(ted.mielczarek)
Comment 2•17 years ago
|
||
Comment on attachment 339439 [details] [diff] [review]
Add --enable-glib build option
This is close, but what I'd like to see is:
1) USE_ELF_DYNSTR_GC should only be set if we're building with the cairo-gtk2 toolkit, so that qt builds will succeed by default
2) --enable-elf-dynstr-gc should force the glib check regardless of toolkit, and error if GLIB_{CFLAGS,LIBS} are not set.
Does that sound reasonable?
Attachment #339439 -
Flags: review?(ted.mielczarek) → review-
| Assignee | ||
Comment 3•17 years ago
|
||
simpler fix according to ted's comment:
> 1) USE_ELF_DYNSTR_GC should only be set if we're building with the cairo-gtk2
> toolkit, so that qt builds will succeed by default
setting USE_ELF_DYNSTR_GC= for cairo-qt
> 2) --enable-elf-dynstr-gc should force the glib check regardless of toolkit,
> and error if GLIB_{CFLAGS,LIBS} are not set.
in the $SKIP_PATH_CHECKS check, it was added a further USE_ELF_DYNSTR_GC= check. So it would work for non-gtk2 build, forcing glib is efl is required.
Attachment #339439 -
Attachment is obsolete: true
Attachment #340489 -
Flags: review?(ted.mielczarek)
Comment 4•17 years ago
|
||
Antonio: bsmedberg suggested that we make glib a build-time requirement, because otherwise we apparently wind up with much larger executables. (the elf-dynstr-gc program does some magic to shrink them.) Can you compare the size difference between a build with and without elf-dynstr-gc? Also, when building a qt build with glib, do you wind up with a runtime dependency on glib? If so, we should fix that.
Comment 5•17 years ago
|
||
Comment on attachment 340489 [details] [diff] [review]
fix for elf-dynstr-gc + non gtk2 (e.g. qt) builds
[Checkin: Comment 9]
Does this error if glib isn't found? I thought PKG_CHECK_MODULES would silently fail, but I can't remember. I'd still like some feedback on my questions in the previous comment.
Attachment #340489 -
Flags: review?(ted.mielczarek) → review+
| Assignee | ||
Comment 6•17 years ago
|
||
> Can you compare the size
> difference between a build with and without elf-dynstr-gc? Also, when building
> a qt build with glib, do you wind up with a runtime dependency on glib? If so,
> we should fix that.
Ted: I will that four checks: build cairo-gtk2 w/ and w/out elf-dynstr-gc , and so cairo-qt.
> Does this error if glib isn't found? I thought PKG_CHECK_MODULES would silently
> fail, but I can't remember. I'd still like some feedback on my questions in the
> previous comment.
yes, pkg-config abort configure if it is not found. If we do not have glib, error message is like:
*********************************
checking for glib-2.0 >= 1.3.7 gobject-2.0... Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found
configure: error: Library requirements (glib-2.0 >= 1.3.7 gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
*********************************
| Assignee | ||
Comment 7•17 years ago
|
||
ted:
cairo-qt + elf = 15610k
cairo-qt - elf = 15520k
numbers from:
du -s $install_prefix/lib/firefox-3.1b1pre/
is that what you want?
Comment 8•17 years ago
|
||
That's interesting, it winds up *smaller*? Either way, it's only 100k, probably not enough to worry about. This patch should be fine as is.
| Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Comment 9•17 years ago
|
||
Comment on attachment 340489 [details] [diff] [review]
fix for elf-dynstr-gc + non gtk2 (e.g. qt) builds
[Checkin: Comment 9]
http://hg.mozilla.org/mozilla-central/rev/ce3fd20cce9f
Attachment #340489 -
Attachment description: fix for elf-dynstr-gc + non gtk2 (e.g. qt) builds → fix for elf-dynstr-gc + non gtk2 (e.g. qt) builds
[Checkin: Comment 9]
Updated•17 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
Version: unspecified → Trunk
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•