... the user friendly GPS tool


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Building routeconverter on OSX
#11
(19.06.2010, 07:26)hvdwolf Wrote: If that possibility is an option, then could you please create a .tgz or .zip from a clean trunk (without the private part)?

Yes, I did the following which worked fine on my machine

removed the complete Maven repository
> svn checkout http://www.routeconverter.de/svn/RouteConverter/trunk/ RouteConverter
> zip -r RouteConverter-src RouteConverter-src/
put it to http://www.routeconverter.de/download/Ro...er-src.zip
> set JAVA_HOME=c:\Programme\Java\jdk1.6.0_20
> mvn clean package

and the result was

[INFO] BUILD SUCCESSFUL
[INFO] Total time: 13 minutes 19 seconds
[INFO] Finished at: Mon Jun 21 08:39:34 CEST 2010

(19.06.2010, 07:26)hvdwolf Wrote: Downloading: http://www.routeconverter.de/svn/RouteTh...-2.0.6.pom

Please update your Maven to a more recent version. 2.0.6 and 2.0.9 contain bugs that lead to the problems to compile the test cases.

I'm using

>mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_20
Java home: c:\Programme\Java\jdk1.6.0_20\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"

(19.06.2010, 07:26)hvdwolf Wrote: I also tried to build it on my Linux server using maven. I get the exact same errors as on OSX, both for downloading during compilation as well as for the XMLGregorianCalendar part
Code:
Failed tests:
  testXMLGregorianCalendarViaDatatypeFactory(slash.navigation.base.TimeZoneTest)
  testWritingRouteConverterExtensions(slash.navigation.gpx.GpxFormatTest)

Please post the test reports
target\surefire-reports\slash.navigation.base.TimeZoneTest.txt
target\surefire-reports\slash.navigation.gpx.GpxFormatTest.txt
here.
--
Christian
Reply
#12
(21.06.2010, 07:53)routeconverter Wrote:
(19.06.2010, 07:26)hvdwolf Wrote: Downloading: http://www.routeconverter.de/svn/RouteTh...-2.0.6.pom

Please update your Maven to a more recent version. 2.0.6 and 2.0.9 contain bugs that lead to the problems to compile the test cases.

I'm using

>mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_20
Java home: c:\Programme\Java\jdk1.6.0_20\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"

I do have a recent version:
Code:
mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_20
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: nl_NL, platform encoding: MacRoman
OS name: "mac os x" version: "10.5.8" arch: "x86_64" Family: "mac"
That maven-2.0.6 message is from maven itself during the "mvn clean package". It has nothing to do with my installed version, but it is obviously one of the dependencies (as defined in the project?).
(21.06.2010, 07:53)routeconverter Wrote: removed the complete Maven repository
> svn checkout http://www.routeconverter.de/svn/RouteConverter/trunk/ RouteConverter
> zip -r RouteConverter-src RouteConverter-src/
put it to http://www.routeconverter.de/download/Ro...er-src.zip
> set JAVA_HOME=c:\Programme\Java\jdk1.6.0_20
> mvn clean package

and the result was

[INFO] BUILD SUCCESSFUL
[INFO] Total time: 13 minutes 19 seconds
[INFO] Finished at: Mon Jun 21 08:39:34 CEST 2010
I downloaded your zip and unzipped it. I did a "mvn clean package" but the testXMLGregorian... error is still the same. You were completely right that the svn checkout is correct. At least one less reason to worry about Smile


(21.06.2010, 07:53)routeconverter Wrote: Please post the test reports
target\surefire-reports\slash.navigation.base.TimeZoneTest.txt
target\surefire-reports\slash.navigation.gpx.GpxFormatTest.txt
here.
Please find the test reports in the attached zip


Attached Files
.zip   testfiles.zip (Size: 1.27 KB / Downloads: 736)
Reply
#13
(18.06.2010, 17:20)hvdwolf Wrote:
(18.06.2010, 09:44)routeconverter Wrote: If you navigate to the TimeZoneTest in IDEA (Control-N is your friend) and execute it within the IDE:
Right-click on the class name and Run 'TimeZoneTest' from the context menu: what's the problem?
When I do that I get the following error:
com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 slash.navigation.base.TimeZoneTest
Cannot instantiate test(s): java.lang.NoClassDefFoundError: slash/common/TestCase

I've analyzed that an IntelliJ bug (http://youtrack.jetbrains.net/issue/IDEA-54254) is the reason for this behaviour and changes the pom's to fix this. Please try again.
--
Christian
Reply
#14
How do you statify a binary? I've tried this:

user@ubuntu810desktop:~/gpsbabel-1.3.6$ ldd gpsbabel
linux-gate.so.1 => (0xb7703000)
libusb-0.1.so.4 => /lib/libusb-0.1.so.4 (0xb76d1000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb76ab000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7683000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7525000)
/lib/ld-linux.so.2 (0xb76e9000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb750c000)
user@ubuntu810desktop:~/gpsbabel-1.3.6$ statifier gpsbabel gpsbabel-static
user@ubuntu810desktop:~/gpsbabel-1.3.6$ ldd gpsbabel-static
not a dynamic executable
user@ubuntu810desktop:~/gpsbabel-1.3.6$ ls -l gpsbabel*
-rwxr-xr-x 1 user user 3261467 2010-05-31 07:44 gpsbabel
-rwxr-xr-x 1 user user 5607424 2010-05-31 07:44 gpsbabel-static
user@ubuntu810desktop:~/gpsbabel-1.3.6$ ./gpsbabel-static -h
Segmentation fault
--
Christian
Reply
#15
(21.06.2010, 08:44)hvdwolf Wrote: I downloaded your zip and unzipped it. I did a "mvn clean package" but the testXMLGregorian... error is still the same.

That was a test setup error...

junit.framework.ComparisonFailure: null expected:<[07.06.]07 14:04> but was:<[7-6-]07 14:04>

As always: Locale problems in the test setup. I think I've fixed that now. Please update your workspace. Are there any errors left?
--
Christian
Reply
#16
I removed the source trunk and downloaded a new one. It compiles further than before but in the end the compilation fails:
Code:
[INFO] Building The RouteConverter UI tool for Webstart
[INFO] ------------------------------------------------------------------------
[WARNING] Removing: jnlp from forked lifecycle, to prevent recursive invocation.
[INFO] [buildnumber:create {execution: default}]
[INFO] Storing buildNumber: 1.230 at timestamp: 1277145459199
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'Cp1252' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/Shared/development/RouteConverter/svnRouteConverter/RouteConverterWebstart/src/main/resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] No sources to compile
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'Cp1252' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/Shared/development/RouteConverter/svnRouteConverter/RouteConverterWebstart/src/test/resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] No tests to run.
[INFO] [jar:jar {execution: default-jar}]
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] [webstart:jnlp {execution: default}]
[INFO] No resources found in /Users/Shared/development/RouteConverter/svnRouteConverter/RouteConverterWebstart/src/main/jnlp/resources
[INFO] artifact active project artifact:
    artifact = active project artifact:
    artifact = active project artifact:
    artifact = active project artifact:
    artifact = slash.navigation:route-converter6:jar:1.34-SNAPSHOT:compile;
    project: MavenProject: slash.navigation:route-converter6:1.34-SNAPSHOT @ /Users/Shared/development/RouteConverter/svnRouteConverter/route-converter6/pom.xml;
    project: MavenProject: slash.navigation:route-converter6:1.34-SNAPSHOT @ /Users/Shared/development/RouteConverter/svnRouteConverter/route-converter6/pom.xml;
    project: MavenProject: slash.navigation:route-converter6:1.34-SNAPSHOT @ /Users/Shared/development/RouteConverter/svnRouteConverter/route-converter6/pom.xml;
    project: MavenProject: slash.navigation:route-converter6:1.34-SNAPSHOT @ /Users/Shared/development/RouteConverter/svnRouteConverter/route-converter6/pom.xml seems to contain the main class: slash.navigation.converter.gui.RouteConverter6 but the jar doesn't seem to contain all dependencies slash/navigation/converter/gui/RouteConverter
[WARNING] artifact active project artifact:
    artifact = active project artifact:
    artifact = active project artifact:
    artifact = active project artifact:
    artifact = slash.navigation:route-converter6:jar:1.34-SNAPSHOT:compile;
    project: MavenProject: slash.navigation:route-converter6:1.34-SNAPSHOT @ /Users/Shared/development/RouteConverter/svnRouteConverter/route-converter6/pom.xml;
    project: MavenProject: slash.navigation:route-converter6:1.34-SNAPSHOT @ /Users/Shared/development/RouteConverter/svnRouteConverter/route-converter6/pom.xml;
    project: MavenProject: slash.navigation:route-converter6:1.34-SNAPSHOT @ /Users/Shared/development/RouteConverter/svnRouteConverter/route-converter6/pom.xml;
    project: MavenProject: slash.navigation:route-converter6:1.34-SNAPSHOT @ /Users/Shared/development/RouteConverter/svnRouteConverter/route-converter6/pom.xml also contains the main class: slash.navigation.converter.gui.RouteConverter6. IGNORED.
[INFO] Usage: jarsigner [options] jar-file alias
[INFO]        jarsigner -verify [options] jar-file
[INFO]
[INFO] [-keystore <url>]           keystore location
[INFO]
[INFO] [-storepass <password>]     password for keystore integrity
[INFO]
[INFO] [-storetype <type>]         keystore type
[INFO]
[INFO] [-keypass <password>]       password for private key (if different)
[INFO]
[INFO] [-sigfile <file>]           name of .SF/.DSA file
[INFO]
[INFO] [-signedjar <file>]         name of signed JAR file
[INFO]
[INFO] [-digestalg <algorithm>]    name of digest algorithm
[INFO]
[INFO] [-sigalg <algorithm>]       name of signature algorithm
[INFO]
[INFO] [-verify]                   verify a signed JAR file
[INFO]
[INFO] [-verbose]                  verbose output when signing/verifying
[INFO]
[INFO] [-certs]                    display certificates when verbose and verifying
[INFO]
[INFO] [-tsa <url>]                location of the Timestamping Authority
[INFO]
[INFO] [-tsacert <alias>]          public key certificate for Timestamping Authority
[INFO]
[INFO] [-altsigner <class>]        class name of an alternative signing mechanism
[INFO]
[INFO] [-altsignerpath <pathlist>] location of an alternative signing mechanism
[INFO]
[INFO] [-internalsf]               include the .SF file inside the signature block
[INFO]
[INFO] [-sectionsonly]             don't compute hash of entire manifest
[INFO]
[INFO] [-protected]                keystore has protected authentication path
[INFO]
[INFO] [-providerName <name>]      provider name
[INFO]
[INFO] [-providerClass <class>     name of cryptographic service provider's
[INFO]   [-providerArg <arg>]] ... master class file and constructor argument
[INFO]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Result of /bin/sh -c "cd /Users/Shared/development/RouteConverter/svnRouteConverter/RouteConverterWebstart/target/jnlp && /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/jarsigner -signedjar /Users/Shared/development/RouteConverter/svnRouteConverter/RouteConverterWebstart/target/jnlp/catalog-1.34-SNAPSHOT.jar /Users/Shared/development/RouteConverter/svnRouteConverter/RouteConverterWebstart/target/jnlp/unprocessed_catalog-1.34-SNAPSHOT.jar" execution is: '1'.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 43 seconds
[INFO] Finished at: Mon Jun 21 20:37:41 CEST 2010
[INFO] Final Memory: 61M/123M
[INFO] ------------------------------------------------------------------------

But fortunately the webstart gets built after the mac jars, so I can at least build the mac jars and do a lot of trial&error changes and checks for the port issue and see if I can work on the bundle.



(21.06.2010, 13:02)routeconverter Wrote: How do you statify a binary? I've tried this:

user@ubuntu810desktop:~/gpsbabel-1.3.6$ statifier gpsbabel gpsbabel-static
I never heard of the statifier tool and neither of ermine.

Normally with an autoconf setup you issue
Quote:./configure --enable-static --disable-shared
As long as the system can find dynamic libraries it will use the dynamic libraries, so that won't work on a normal system.
You can however tell gcc where to look for the static libraries.
First you check with ldd (like you did) which libraries are necessary. And repeat that step for the necessary libraries itself. If, for example, libexpat.so needs another lib, you need that static library as well. (note: on OSX you would use "otool -L library/binary" instead of ldd).
So you could do
Quote:export LDFLAGS=<my location>/lib
and copy the necessary static libraries from their original location to "<my location>/lib" and then run the compilation like
Quote:export LDFLAGS=/home/spiderman/development/lib
./configure --enable-static --disable-shared
make
If that doesn't work you can also look in the Makefile for "gcc". Most of the times you will find "CC=gcc" (or just CC=cc). Than you search for all CC occurrences wich you will find in lines like
Quote:$(CC) -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
which you need to change to
Quote:$(CC) -static -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@

Now if all these measures still fail, then you are in bad luck and you won't be succesful AFAIK.

And another bummer here: the libc and libm libraries are never statically compiled (on newer linuxes). You will only find .so ones and not the static .a ones. It means that it is simply not possible to create a static gpsbabel library.
At least, I don't know how (and I don't consider myself a beginner with regard to compiling).
Reply
#17
(21.06.2010, 19:47)hvdwolf Wrote: [INFO] Result of /bin/sh -c "cd /Users/Shared/development/RouteConverter/svnRouteConverter/RouteConverterWebstart/target/jnlp && /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/jarsigner -signedjar /Users/Shared/development/RouteConverter/svnRouteConverter/RouteConverterWebstart/target/jnlp/catalog-1.34-SNAPSHOT.jar /Users/Shared/development/RouteConverter/svnRouteConverter/RouteConverterWebstart/target/jnlp/unprocessed_catalog-1.34-SNAPSHOT.jar" execution is: '1'.

That step is failing since the Webstart version requires the jars to be signed and thus a key store which I didn't make public. I've just moved the Webstart build plugins to a different profile - does the compilation now succeed on your machine?

(21.06.2010, 19:47)hvdwolf Wrote: Normally with an autoconf setup you issue
Quote:./configure --enable-static --disable-shared
As long as the system can find dynamic libraries it will use the dynamic libraries, so that won't work on a normal system.
You can however tell gcc where to look for the static libraries.
First you check with ldd (like you did) which libraries are necessary.

So gpsbabel needs

Quote:user@ubuntu810desktop:~/gpsbabel-1.3.6$ ldd gpsbabel
linux-gate.so.1 => (0xb77ff000)
libusb-0.1.so.4 => /lib/libusb-0.1.so.4 (0xb77cd000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb77a7000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb777f000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7621000)
/lib/ld-linux.so.2 (0xb77e5000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7608000

What I understood from your statements below is that the libraries prefixed with /lib/tls cannot be statically linked. So libusb and libexpat the libraries as I didn't find a configure-switch to disable the usb stuff.

(21.06.2010, 19:47)hvdwolf Wrote: So you could do
Quote:export LDFLAGS=<my location>/lib
and copy the necessary static libraries from their original location to "<my location>/lib" and then run the compilation like
export LDFLAGS=/home/spiderman/development/lib
./configure --enable-static --disable-shared
make

That didn't make any difference on my machine. I even moved the *so* stuff from libusb and libexpat away from /usr/lib during the compilation - the binary didn't start without them.

(21.06.2010, 19:47)hvdwolf Wrote: If that doesn't work you can also look in the Makefile for "gcc". Most of the times you will find "CC=gcc" (or just CC=cc). Than you search for all CC occurrences wich you will find in lines like
Quote:$(CC) -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
which you need to change to
Quote:$(CC) -static -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@

Now if all these measures still fail, then you are in bad luck and you won't be succesful AFAIK.

I've tried that, but the result is

/usr/lib/libc.a(mktime.o)Sad.rodata+0x0): multiple definition of `__mon_yday'
strptime.oSad.rodata+0x220): first defined here
collect2: ld returned 1 exit status
make: *** [gpsbabel] Error 1

(21.06.2010, 19:47)hvdwolf Wrote: It means that it is simply not possible to create a static gpsbabel library.

Unless you're somehow successful or have another hint, I'd better rethink the gpsbabel stuff.
--
Christian
Reply
#18
(22.06.2010, 14:37)routeconverter Wrote:
(21.06.2010, 19:47)hvdwolf Wrote: It means that it is simply not possible to create a static gpsbabel library.

Unless you're somehow successful or have another hint, I'd better rethink the gpsbabel stuff.

I think I've managed to produce a binary with

Quote:./configure --enable-static --disable-shared --without-libusb

and the replacement of -Lexpat to /usr/lib/libexpat.a in the Makefile that only links to libm and libc

Quote:user@ubuntu810desktop:~/gpsbabel-1.3.6$ ldd gpsbabel.static
linux-gate.so.1 => (0xb77a6000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7757000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb75f9000)
/lib/ld-linux.so.2 (0xb778c000)

I've stripped it to reduce it's size and attached it to this posting. Does it work on your Linux box?


Attached Files
.zip   gpsbabel.static.zip (Size: 494.76 KB / Downloads: 762)
--
Christian
Reply
#19
(22.06.2010, 17:14)routeconverter Wrote:
(22.06.2010, 14:37)routeconverter Wrote:
(21.06.2010, 19:47)hvdwolf Wrote: It means that it is simply not possible to create a static gpsbabel library.

Unless you're somehow successful or have another hint, I'd better rethink the gpsbabel stuff.

I think I've managed to produce a binary with

Quote:./configure --enable-static --disable-shared --without-libusb

and the replacement of -Lexpat to /usr/lib/libexpat.a in the Makefile that only links to libm and libc

Quote:user@ubuntu810desktop:~/gpsbabel-1.3.6$ ldd gpsbabel.static
linux-gate.so.1 => (0xb77a6000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7757000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb75f9000)
/lib/ld-linux.so.2 (0xb778c000)

I've stripped it to reduce it's size and attached it to this posting. Does it work on your Linux box?

Good work.
It works fine on my Ubuntu 9.10 box. Did you compile it on your 8.10 version?
(22.06.2010, 14:37)routeconverter Wrote: That step is failing since the Webstart version requires the jars to be signed and thus a key store which I didn't make public. I've just moved the Webstart build plugins to a different profile - does the compilation now succeed on your machine?
Yes, it builds succesfully now. Thanks.

(22.06.2010, 14:37)routeconverter Wrote: That didn't make any difference on my machine. I even moved the *so* stuff from libusb and libexpat away from /usr/lib during the compilation - the binary didn't start without them.
I forgot to mention that a lot of libraries write a configuration file inside the "/usr/lib/pkgconfig/" or "/usr/local/lib/pkgconfig/" directory (linux paths here). The autoconf tool configure knows where to find these files. If these files exists it also means that the library exists. So the configure tool expects them to be available, and fails during linking.
The config files inside the pkgconfig folder are actually meant to see how the library was compiled: against which other libraries, with which optimization or debug level/parameters, etc.
Reply
#20
(22.06.2010, 21:08)hvdwolf Wrote: Good work.
It works fine on my Ubuntu 9.10 box. Did you compile it on your 8.10 version?

Yes. Thank you for testing. I'll use that binary for the next release.
--
Christian
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)