Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369215

Summary: Improve core.net linux makefile
Product: [Eclipse Project] Platform Reporter: Krzysztof Daniel <krzysztof.daniel>
Component: TeamAssignee: Krzysztof Daniel <krzysztof.daniel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: krzysztof.daniel, sptaszkiewicz, Szymon.Brandys, tomasz.zarna
Version: 3.8Flags: malgorzata.tomczyk: review+
Target Milestone: 4.3 M4   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch proposition
none
A better patch
none
Even better patch
none
yet another patch none

Description Krzysztof Daniel CLA 2012-01-20 07:40:50 EST
It is enough to have only one makefile which builds for x86 and x86_64 bit platforms.

Hardcoding paths to libraries should be avoided, and pkg-config should be used instead.
Comment 1 Krzysztof Daniel CLA 2012-01-20 07:41:52 EST
Created attachment 209813 [details]
Patch proposition
Comment 2 Krzysztof Daniel CLA 2012-02-08 04:28:18 EST
Created attachment 210714 [details]
A better patch

Support for cross-compilation is there, but it requires explictly setting a variable before running the script.
Comment 3 Krzysztof Daniel CLA 2012-02-08 07:58:01 EST
Created attachment 210727 [details]
Even better patch
Comment 4 Krzysztof Daniel CLA 2012-02-10 06:39:57 EST
Explanation of the patch:
(1) Dropped dependency to deprecated libraries which are no longer a must, and are removed from some linux distributions (f.e. Orbit-2).

(2)
Direct references to libraries
INCLUDE = -I/usr/include/gconf/2/ -I/usr/include/orbit-2.0/ -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include/
LIBS := -lgconf-2 -lORBit-2 -lgthread-2.0 -lrt -lgobject-2.0 -lglib-2.0
are now replaced with pkg-config, which queries system for the location of those libraries.

(3) 
Build for both architectures is unified.
Previously there were two build files for x86_64 and x86. Right now the build file builds for the architecture on which it is run unless a flag ${TARGET_ENVIRONMENT} is set. if the target environment is set (f.e. by calling export TARGET_ENVIRONMET=-m32 before launching the makefile) the crosscompilation will happen.

The scripts are proven to build in fedora build system:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3778062
Comment 5 Krzysztof Daniel CLA 2012-10-24 07:15:06 EDT
Created attachment 222718 [details]
yet another patch
Comment 6 Malgorzata Janczarska CLA 2012-11-06 09:23:23 EST
Pushed in http://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=26fa0e164815e26b48664a360ba6de231af744a8
Krzysztof, please verify.
Comment 7 Krzysztof Daniel CLA 2012-11-07 07:00:03 EST
I was able to successfully build the native library on f17 x86_64 using the commit 325126585d2b6de9bdaa09ac3885092b32c99628.