Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 16-03-2010, 00:17   #1
Registered User

Join Date: Sep 2007
Location: FL
Boat: Pacific Seacraft 31 - Cielo Azul
Posts: 359
Images: 3
Compiling on Fedora 12

gcc 4.4.3

First complained about missing prototype, so I added:
ocpCursor(char **base, long type, int hotSpotX=0, int hotSpotY=0) tp ocpCursor class in chcanv.h.

Then fails with:
src/navutil.cpp: In member function ‘void X11FontPicker::InitializeAllAvailableFonts()’:
src/navutil.cpp:5115: error: parameter may not have variably modified type ‘wxString [(((unsigned int)(((int)i) + -0x000000001)) + 1)]’
src/navutil.cpp: In member function ‘voidX11FontPicker::SetChoiceOptionsFromFacename(w xString&)’:
src/navutil.cpp:5386: error: parameter may not have variably modified type ‘wxString [(((unsigned int)(((int)i) + -0x000000001)) + 1)]’
src/navutil.cpp:5420: error: parameter may not have variably modified type ‘wxString [(((unsigned int)(((int)i) + -0x000000001)) + 1)]’
src/navutil.cpp:5451: error: parameter may not have variably modified type ‘wxString [(((unsigned int)(((int)i) + -0x000000001)) + 1)]’
make: *** [navutil.o] Error 1

it doesn't like:
wxStringTokenizer st ( wxString ( list[i] ), _T ( "-" ) )


any ideas?

Tom
__________________

__________________
teejayevans is offline   Reply With Quote
Old 17-03-2010, 11:03   #2
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
I compile with gcc 4.4.1 that comes with Kubuntu 9.10, without problems. There has however been similar error earlier. I think that what happens is that newer versions of gcc is getting stricter, and pickier.
Quote:
error: parameter may not have variably modified type
This means just what it says, probably not a big deal to fix.
Next Ubuntu will use gcc 4.4.2, so this may just affect this distro as well.
Hopefully this will be sorted quickly when Dave is back.( within 7 -10 days, me thinks.)

Thomas
__________________

__________________
cagney is offline   Reply With Quote
Old 17-03-2010, 11:06   #3
Registered User
 
antonm's Avatar

Join Date: Feb 2010
Location: Saint Petersburg, Russia
Posts: 66
Quote:
Originally Posted by cagney View Post
Next Ubuntu will use gcc 4.4.2, so this may just affect this distro as well.
I am building on Debian fine with:

gcc (Debian 4.4.2-9) 4.4.3 20100108 (prerelease)
__________________
antonm is offline   Reply With Quote
Old 18-03-2010, 19:40   #4
Registered User

Join Date: Sep 2007
Location: FL
Boat: Pacific Seacraft 31 - Cielo Azul
Posts: 359
Images: 3
After fixing a bunch of compile errors I tried to run it but ended
up crashing. I gave up, thx
Will use Seaclear under wine for now.
Tom
__________________
teejayevans is offline   Reply With Quote
Old 19-03-2010, 03:30   #5
Registered User
 
antonm's Avatar

Join Date: Feb 2010
Location: Saint Petersburg, Russia
Posts: 66
Quote:
Originally Posted by teejayevans View Post
After fixing a bunch of compile errors I tried to run it but ended up crashing. I gave up, thx
Have you also tried instaling alien converted RPM package?

http://www.tighnamara.ca/opencpn/sit...alien.i386.rpm
__________________
antonm is offline   Reply With Quote
Old 19-03-2010, 11:07   #6
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
teejayevans
You must be very close, as you managed to compile and then had a crash. We had a similar situation last week, and it showed up to be a locale problem. Read from his post and onwards Cruisers & Sailing Forums - View Profile: Knaz

Try to get a dump from ddd similar to Knaz.

Another thing, unless you compile using the latest CVS, you have to implement the workaround described in this post OpenCPN Version 1.3.5 Beta Technical

Can you publish your fixes for the compile errors ?

Thomas
__________________
cagney is offline   Reply With Quote
Old 21-03-2010, 18:15   #7
Registered User

Join Date: Sep 2007
Location: FL
Boat: Pacific Seacraft 31 - Cielo Azul
Posts: 359
Images: 3
I've attached the screenshot of error with my compile.
I got around the originial problem by doing this:
wxString wxs = wxString (list[i]);
wxStringTokenizer st ( wxs.c_str(), _T ( "-" ) );
In addition I had to create some dummy functions that
ended up being #defined out in nmea.c.
I tried using gpsd.
I don't think my hacks are worthy of publishing ;-)

this is what I get with rpm version:
opencpn: Symbol `_ZTV10wxClientDC' has different size in shared object, consider re-linking
opencpn: Symbol `_ZTV16wxGenericDirCtrl' has different size in shared object, consider re-linking
opencpn: Symbol `_ZTV10wxMemoryDC' has different size in shared object, consider re-linking
opencpn: Symbol `_ZTV9wxPaintDC' has different size in shared object, consider re-linking
Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.4,compatible with 2.6),
and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6).
Tom
Attached Thumbnails
Click image for larger version

Name:	Screenshot-Untitled Window.png
Views:	123
Size:	15.0 KB
ID:	14019  
__________________
teejayevans is offline   Reply With Quote
Old 22-03-2010, 10:45   #8
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
Regarding using the published rpm, derived through alien from Ubuntu 9.10 on Fedora 12, see this post RPMs and the following posts.

Thomas
__________________
cagney is offline   Reply With Quote
Old 23-03-2010, 17:21   #9
Registered User

Join Date: Mar 2010
Posts: 9
Hi Folks.
I see this thread is current so I hope to learn something from the community. I've been attempting to compile and install opencpn on a small p3 laptop. I've struggled and succeeded installing wx widgets (X11), and appear to have compiled opencpn-1.3.6 successfully.
When I do "make" I get:
PHP Code:
In file included from src/chcanv.cpp:254:
././include/
grib.h:83warning‘typedef’ was ignored in this declaration
src
/chcanv.cpp:6850errorprototype for ‘ocpCursor::ocpCursor(char**, long intintint)’ does not match any in class ‘ocpCursor’
././include/chcanv.h:628errorcandidates areocpCursor::ocpCursor(const ocpCursor&)
././include/
chcanv.h:632error:                 ocpCursor::ocpCursor(const char**, long intintint)
src/chcanv.cpp:6697error:                 ocpCursor::ocpCursor(const wxString&, long intintint)
make: *** [chcanv.oError 1 
Being an open-source person by principle I would love to persevere and solve the problem but my lack of expertise (being an old dog!) has lead me to this forum.
__________________
snicco is offline   Reply With Quote
Old 23-03-2010, 20:42   #10
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
X11 build

Snicco...

The __WXX11__ build has not been maintained very well, I'm afraid. Most (all?) linux users are using the GTK2 build. Will this run on your platform?

Anyway, if you want to try to make it work, try this:

chcanv.cpp:6850

Code:
ocpCursor::ocpCursor ( const char **xpm_data, long type,
                       int hotSpotX, int hotSpotY ) : wxCursor ( wxCURSOR_CROSS )
Note the "const" in the method declaration, to match the .h file....

Good Luck
Dave
__________________
bdbcat is offline   Reply With Quote
Old 23-03-2010, 23:25   #11
Registered User

Join Date: Mar 2010
Posts: 9
Thanks Dave,
That moved things along to " src/navutil.cpp " and then threw errors. I'll try removing wxX11 and installing the GTK2 version, and keep my progress posted. Meanwhile, back to chasing dry rot in an ancient boat....
__________________
snicco is offline   Reply With Quote
Old 24-03-2010, 05:09   #12
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 335
Hi snicco, I'm compiling it without any problem on Fedora12 here.
Simply install wxGTK-devel package:
Code:
yum install wxGTK-devel
and it should just work!
__________________
SethDart is offline   Reply With Quote
Old 24-03-2010, 15:55   #13
Registered User

Join Date: Mar 2010
Posts: 9
Thanks Dave and SethDart, I've installed the GTK version of wxwidgets and gtk-devel. In compiling opencpn the only curious lines are:
PHP Code:
checking for __WXX11__... no
checking 
for __WXGTK__... no 
Doing "make" throws errors at
PHP Code:
src/bbox.cpp:11:23errorwx/wxprec.hNo such file or directory 
however
PHP Code:
locate wx/wxprec.h
/home/****/rpmbuild/BUILD/wxGTK-2.8.10/include/wx/wxprec.h
/usr/include/wx-2.8/wx/wxprec.
Back to paint scraping!
__________________
snicco is offline   Reply With Quote
Old 24-03-2010, 16:03   #14
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
You need wxGTK and wxGTK-devel.
__________________
cagney is offline   Reply With Quote
Old 24-03-2010, 16:07   #15
Registered User

Join Date: Mar 2010
Posts: 9
Sorry, meant to say installed wxgtk-devel!
__________________

__________________
snicco 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling OpenCPN on Fedora 12 inSaNo OpenCPN 9 08-12-2009 05:09



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 02:18.


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.