Closed Bug 451669 Opened 17 years ago Closed 13 years ago

Linux build fails when HAVE_VISIBILITY_ATTRIBUTE and HAVE_VISIBILITY_HIDDEN_ATTRIBUTE are defined

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: fredbezies, Assigned: mikekap)

References

Details

(Keywords: crash)

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1a2pre) Gecko/20080821080332 Firefox/3.1a2pre Build Identifier: It is simple to reproduce. See details. Reproducible: Always Steps to Reproduce: 1.Grab an up-to-date source-code 2.use .mozconfig in more details 3.launch build and wait Actual Results: Crash while linking libxul.so Expected Results: Continue building. Error log : "../../staticlib/components/libgklayout.a(nsCanvasRenderingContext2D.o): In function `nsCanvasRenderingContext2D::PutImageData()': nsCanvasRenderingContext2D.cpp:(.text+0x4165): undefined reference to `js_ArrayToJSUint8Buffer' /usr/bin/ld: ../../staticlib/components/libgklayout.a(nsCanvasRenderingContext2D.o): relocation R_X86_64_PC32 against `js_ArrayToJSUint8Buffer' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value" My .mozconfig : # # See http://www.mozilla.org/build/ for build instructions. # . $topsrcdir/browser/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-fx # Options for 'configure' (same as command-line options). ac_add_options --enable-optimize="-Os -march=native -w -pipe" ac_add_options --disable-debug ac_add_options --disable-tests ac_add_options --enable-strip I'm using an up-to-date Ubuntu 8.04.1 LTS AMD64.
I forgot to add that I verified that this changeset was applied : http://hg.mozilla.org/mozilla-central/index.cgi/rev/7098e0020929
Keywords: crash
Oops ! Looks like patch for bug 451242 is guilty here. Closing it as a duplicate of 451242. /me will search longer before opening another bug soon :(
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Not a dupe, bug 451242 is the cause. Patch in a sec.
Blocks: 451242
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Oops :) Looks like I closed it too soon :( Not my day today :(
Attached patch Patch v1 (obsolete) — Splinter Review
configure script generates: #define HAVE_VISIBILITY_ATTRIBUTE 1 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1 which (I think) makes it fail. Seems that the JS_FRIEND_API adds __attribute__((visibility ("default"))) in some cases. This should take care of it. I'm _not_ entirely sure this works anywhere but linux as of now!
Assignee: nobody → mike.kaplinskiy
Status: REOPENED → ASSIGNED
Attachment #335003 - Flags: review?(jst)
This problem goes away on Linux if that code is removed and replaced with a #include "jsarray.h" too. Any reason not to simply do that here?
I figured vlad had a reason for forwarding it instead of including jsarray.h, so I just decided to add the minimal required for it to build. Clarified title.
Summary: Since Trace Monkey landing, building process is killed in libxul.so linking on AMD64 → Linux build fails when HAVE_VISIBILITY_ATTRIBUTE and HAVE_VISIBILITY_HIDDEN_ATTRIBUTE are defined
Version: unspecified → Trunk
Comment on attachment 335003 [details] [diff] [review] Patch v1 Ok, let's get this in to fix the build bustage, but I'd say we leave the bug open to figure out if it makes sense to leave this or replace it with the #include...
Attachment #335003 - Flags: superreview+
Attachment #335003 - Flags: review?(jst)
Attachment #335003 - Flags: review+
Attached patch Patch v1.1Splinter Review
Didn't need the #define bit.
Attachment #335003 - Attachment is obsolete: true
Keywords: checkin-needed
Whiteboard: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Keywords: checkin-needed
Whiteboard: checkin-needed
Reopening as per comment #8
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Vlad, any thoughts here?
That fix looks fine -- I didn't think jsarray.h was exported? If it is then I can just #include jsarray.h at the top, I can do that along with some other cleanup if that fix works.
(In reply to comment #13) > That fix looks fine -- I didn't think jsarray.h was exported? It is, check EXPORTS in js/src/Makefile.in
Long fixed. Closing now ?
Status: REOPENED → RESOLVED
Closed: 17 years ago13 years ago
Resolution: --- → WORKSFORME
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: