Last Comment Bug 337196 - build fix for cvs head 2006-05-08
: build fix for cvs head 2006-05-08
Status: RESOLVED FIXED
: fixed1.8.0.5, fixed1.8.1
Product: Core Graveyard
Classification: Graveyard
Component: Java to XPCOM Bridge (show other bugs)
: Trunk
: x86 Linux
: -- normal (vote)
: ---
Assigned To: jhp (no longer active)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-08 15:00 PDT by Michal Ceresna
Modified: 2014-09-24 05:43 PDT (History)
1 user (show)
dveditz: blocking1.8.0.5+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
build fix (743 bytes, patch)
2006-05-08 15:02 PDT, Michal Ceresna
jhpedemonte: review-
Details | Diff | Splinter Review
patch v2 (2.26 KB, patch)
2006-05-09 08:59 PDT, jhp (no longer active)
jhpedemonte: review+
jhpedemonte: approval‑branch‑1.8.1+
dveditz: approval1.8.0.5+
Details | Diff | Splinter Review

Description Michal Ceresna 2006-05-08 15:00:47 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.2) Gecko/20060419 Fedora/1.5.0.2-1.2.fc5 Firefox/1.5.0.2 pango-text
Build Identifier: 

Here is some small build fix to make the javaxpcomglue
export the JNI function.



Reproducible: Always
Comment 1 Michal Ceresna 2006-05-08 15:02:51 PDT
Created attachment 221370 [details] [diff] [review]
build fix

compiler: gcc version 4.1.0 20060304 (Red Hat 4.1.0-3)


the function was in the local scope due to the default gcc switch:
-fvisibility=hidden
Comment 2 jhp (no longer active) 2006-05-09 08:57:16 PDT
Comment on attachment 221370 [details] [diff] [review]
build fix

It's not as simple as adding NS_EXPORT there.  This works fine for Linux and Mac OS X, but Win32 (and OS/2, I believe) woudl define both NS_EXPORT and JNIEXPORT as "__declspec(dllexport)", which works, but leads to warnings.  New patch to follow.
Comment 3 jhp (no longer active) 2006-05-09 08:59:24 PDT
Created attachment 221461 [details] [diff] [review]
patch v2

This doesn't add NS_EXPORT for Win32 and OS/2, so no warning.  Also, I made sure to make JNI_OnLoad and JNI_OnUnLoad visible.  Let me know if this works for you.
Comment 4 Michal Ceresna 2006-05-10 00:48:54 PDT
(In reply to comment #3)
Works also for me. 

Note, I had some rejects when applying the patch due
to some whitespace differences which I had to resolve
manually.
Comment 5 jhp (no longer active) 2006-05-10 08:05:10 PDT
Comment on attachment 221461 [details] [diff] [review]
patch v2

Setting r+ based on comment #4.  Will check in once the trunk is open.
Comment 6 jhp (no longer active) 2006-05-17 14:44:31 PDT
Checked in to trunk.  Will check in to 1.8 branch when it opens.
Comment 7 jhp (no longer active) 2006-05-18 07:17:02 PDT
Comment on attachment 221461 [details] [diff] [review]
patch v2

Seeking approval for 1.8.0.5.  This is a very minor fix to allow these public methods to be properly exported when using GCC's visibility feature.
Comment 8 Daniel Veditz [:dveditz] 2006-06-12 11:55:34 PDT
Comment on attachment 221461 [details] [diff] [review]
patch v2

approved for 1.8.0 branch, a=dveditz for drivers

Note You need to log in before you can comment on or make changes to this bug.