Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-02-2013, 04:37   #1
Registered User

Join Date: Feb 2013
Location: Lower Austria
Posts: 11
Send a message via ICQ to rahra Send a message via Skype™ to rahra
Failed to compile 3.0.2 on Debian Squeeze

Hi!

I compiled OpenCPN 3.0.2 from source for my Debian Squeeze system because the official .deb package does not work because it require glibc2.14. Debian Squeeze currently is at 2.13.

The files chart1.cpp and about.cpp include the file <version.h> instead of <wx/version.h>. A patched this manually. I also had to add the macros VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, and VERSION_DATE.

After that it compiles fine.
Following the snippets of the make output:

p, li { white-space: pre-wrap; }

[ 47%] Built target i18n
Scanning dependencies of target opencpn
[ 47%] Building CXX object CMakeFiles/opencpn.dir/src/chart1.cpp.o
/home/eagle/OpenCPN-3.0.2-Source/src/chart1.cpp:44:31: fatal error: version.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/opencpn.dir/src/chart1.cpp.o] Error 1
make[1]: *** [CMakeFiles/opencpn.dir/all] Error 2
make: *** [all] Error 2






[ 56%] Building CXX object CMakeFiles/opencpn.dir/src/about.cpp.o
/home/eagle/OpenCPN-3.0.2-Source/src/about.cpp:40:31: fatal error: version.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/opencpn.dir/src/about.cpp.o] Error 1
make[1]: *** [CMakeFiles/opencpn.dir/all] Error 2
make: *** [all] Error 2




[ 48%] Building CXX object CMakeFiles/opencpn.dir/src/about.cpp.o
/home/eagle/OpenCPN-3.0.2-Source/src/about.cpp:54:57: error: ‘VERSION_MAJOR’ was not declared in this scope
/home/eagle/OpenCPN-3.0.2-Source/src/about.cpp:55:57: error: ‘VERSION_MINOR’ was not declared in this scope
/home/eagle/OpenCPN-3.0.2-Source/src/about.cpp:56:57: error: ‘VERSION_PATCH’ was not declared in this scope
/home/eagle/OpenCPN-3.0.2-Source/src/about.cpp:57:27: error: ‘VERSION_DATE’ was not declared in this scope
make[2]: *** [CMakeFiles/opencpn.dir/src/about.cpp.o] Error 1
make[1]: *** [CMakeFiles/opencpn.dir/all] Error 2
make: *** [all] Error 2


Best regards,
bh
__________________

__________________
rahra is offline   Reply With Quote
Old 11-02-2013, 05:39   #2
cruiser

Join Date: Jan 2013
Posts: 72
Re: Failed to compile 3.0.2 on Debian Squeeze

Failed to compile 3.0.2 on Debian Squeeze

yes, I have similar problem. failed to compile 3.0.2 on my Yugo car. always overcook boiled eggs
__________________

__________________
scimitar is offline   Reply With Quote
Old 12-02-2013, 03:44   #3
Registered User

Join Date: Feb 2013
Location: Moscow, Russia
Boat: Duet 16
Posts: 16
Re: Failed to compile 3.0.2 on Debian Squeeze

I have successfully compiled 3.0.2 on armel under debian wheeze I can share binary *.deb package.
__________________
sevanopula is offline   Reply With Quote
Old 12-02-2013, 06:25   #4
Registered User

Join Date: Jan 2010
Location: Montevideo, Uruguay
Posts: 238
Re: Failed to compile 3.0.2 on Debian Squeeze

Quote:
Originally Posted by scimitar View Post
Failed to compile 3.0.2 on Debian Squeeze

yes, I have similar problem. failed to compile 3.0.2 on my Yugo car. always overcook boiled eggs
Debian Squeeze is the latest stable release from THE reference GNU/Linux distribution, not comparable to a Yugo-type product.
__________________
dpons is offline   Reply With Quote
Old 12-02-2013, 06:29   #5
Registered User

Join Date: Feb 2013
Location: Lower Austria
Posts: 11
Send a message via ICQ to rahra Send a message via Skype™ to rahra
Re: Failed to compile 3.0.2 on Debian Squeeze

Quote:
Originally Posted by sevanopula View Post
I have successfully compiled 3.0.2 on armel under debian wheeze I can share binary *.deb package.
Did it compile out of the box without manual intervention on your system?

As I wrote I was also able to compile it but after doing some patches.
But I think it would be interesting for other people to have a deb package for Squeeze because the official Ubuntu package does not smoothly install.

Bernhard
__________________
rahra is offline   Reply With Quote
Old 12-02-2013, 06:30   #6
Registered User

Join Date: Jan 2010
Location: Montevideo, Uruguay
Posts: 238
Re: Failed to compile 3.0.2 on Debian Squeeze

Rahra, most of my problems with Squeeze went away with the latest beta, which runs quite well, sound and all. I haven't tested all the features, yet the ones I use (route planning, gps garmin uploads, navigation, etc) work without glitches.
__________________
dpons is offline   Reply With Quote
Old 12-02-2013, 08:09   #7
Registered User

Join Date: Feb 2013
Location: Moscow, Russia
Boat: Duet 16
Posts: 16
Re: Failed to compile 3.0.2 on Debian Squeeze

Quote:
Originally Posted by rahra View Post
Did it compile out of the box without manual intervention on your system?

As I wrote I was also able to compile it but after doing some patches.
But I think it would be interesting for other people to have a deb package for Squeeze because the official Ubuntu package does not smoothly install.

Bernhard
At first time i tried to compile in squeeze armel and armhf, but compiler give errors. At second time i successfully compiled in wheezy armel. In wheezy armhf compiling was also successfully, but in this version OpenCPN closed while indexing CM93 charts. I think this isa bug of version 3.0.2. A all times i installed before some libs as recommended.
__________________
sevanopula is offline   Reply With Quote
Old 12-02-2013, 11:39   #8
Registered User

Join Date: Feb 2013
Location: Lower Austria
Posts: 11
Send a message via ICQ to rahra Send a message via Skype™ to rahra
Re: Failed to compile 3.0.2 on Debian Squeeze

I checked out the latest version from github but it is the same problem.
The files chart1.cpp and about.cpp include <version.h> instead of <wx/version.h> and about.cpp also includes "version.h" which does not exist at all. In the root of the source directory there is a file named version.h.in which looks like an autoconf file.
But OpenCPN is built with cmake. I'm familiar with autoconf but have no idea about cmake. Probaby it is a cmake problem.

Bernhard
__________________
rahra is offline   Reply With Quote
Old 12-02-2013, 11:47   #9
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,018
Re: Failed to compile 3.0.2 on Debian Squeeze

Bernhard...
version.h is generated by the cmake configure step (cmake ..), there's no error in the code.
Please try tu purge your build directory and then run
Code:
cmake ..
cmake --build .
If it still fails, I would be interested in the cmake .. output and CMakeCache.txt

Edit: The above assumes you are in <opencpnsrcroot>/build directory as suggested in the build instructions

Pavel
__________________
nohal is offline   Reply With Quote
Old 12-02-2013, 12:10   #10
Registered User

Join Date: Feb 2013
Location: Lower Austria
Posts: 11
Send a message via ICQ to rahra Send a message via Skype™ to rahra
Re: Failed to compile 3.0.2 on Debian Squeeze

Great success! It worked

Of course I followed the instructions in INSTALL but it says to run `make` and not `cmake --build .` and this seems to be the problem.

Bernhard
__________________
rahra is offline   Reply With Quote
Old 12-02-2013, 14:14   #11
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,018
Re: Failed to compile 3.0.2 on Debian Squeeze

cmake --build . and make actually do exactly the same thing... I suppose you probably might have done "make clean", which deletes version.h, before you tried the build before. Might that be the case?

Pavel
__________________
nohal is offline   Reply With Quote
Old 12-02-2013, 23:45   #12
Registered User

Join Date: Feb 2013
Location: Lower Austria
Posts: 11
Send a message via ICQ to rahra Send a message via Skype™ to rahra
Re: Failed to compile 3.0.2 on Debian Squeeze

Pavel,

Yes, this was the problem. I tried again now and it worked also with `make`. Probably it should be mentioned in the INSTALL. Although I am a developer myself I fell into this just because of not being familiar with cmake. It isn't that widely used.

Thanks,
Bernhard
__________________
rahra is offline   Reply With Quote
Old 15-05-2014, 10:39   #13
Registered User

Join Date: May 2014
Posts: 1
Re: Failed to compile 3.0.2 on Debian Squeeze

Hi All!

I have been encountering the same problem as rahra.

I have managed to change both about.cpp and chart.cpp to have wx/version.h, but am now getting the following error :


[ 38%] Building CXX object CMakeFiles/opencpn.dir/src/about.cpp.o
/home/ubuntu/OpenCPN/src/about.cpp:51:57: error: 'VERSION_MAJOR' was not declared in this scope
/home/ubuntu/OpenCPN/src/about.cpp:52:57: error: 'VERSION_MINOR' was not declared in this scope
/home/ubuntu/OpenCPN/src/about.cpp:53:57: error: 'VERSION_PATCH' was not declared in this scope
/home/ubuntu/OpenCPN/src/about.cpp:54:27: error: 'VERSION_DATE' was not declared in this scope
make[2]: *** [CMakeFiles/opencpn.dir/src/about.cpp.o] Error 1
make[1]: *** [CMakeFiles/opencpn.dir/all] Error 2
make: *** [all] Error 2

rahra, what did you do to fix this error?

Many thanks!

Axel
__________________
Axxoul is offline   Reply With Quote
Old 15-05-2014, 12:14   #14
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,018
Re: Failed to compile 3.0.2 on Debian Squeeze

Axel...
And did you do what resolved it for rahra? it's just one post above...
And do you have any reason to try to compile the several years old version 3.0.2?

Pavel
__________________

__________________
nohal is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 20:44.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.