Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 15-03-2010, 23:17   #1
Registered User

Join Date: Sep 2007
Location: FL
Boat: Pacific Seacraft 31 - Cielo Azul
Posts: 360
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, 10:03   #2
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
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, 10: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, 18:40   #4
Registered User

Join Date: Sep 2007
Location: FL
Boat: Pacific Seacraft 31 - Cielo Azul
Posts: 360
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, 02: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, 10:07   #6
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
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 http://www.cruisersforum.com/forums/...tml#post363670

Can you publish your fixes for the compile errors ?

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

Join Date: Sep 2007
Location: FL
Boat: Pacific Seacraft 31 - Cielo Azul
Posts: 360
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:	204
Size:	15.0 KB
ID:	14019  
teejayevans is offline   Reply With Quote
Old 22-03-2010, 09:45   #8
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Regarding using the published rpm, derived through alien from Ubuntu 9.10 on Fedora 12, see this post http://www.cruisersforum.com/forums/...tml#post413043 and the following posts.

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

Join Date: Mar 2010
Posts: 14
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, 19:42   #10
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,384
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, 22:25   #11
Registered User

Join Date: Mar 2010
Posts: 14
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, 04:09   #12
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 340
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, 14:55   #13
Registered User

Join Date: Mar 2010
Posts: 14
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, 15:03   #14
Registered User

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

Join Date: Mar 2010
Posts: 14
Sorry, meant to say installed wxgtk-devel!
snicco is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 04:09

Advertise Here


All times are GMT -7. The time now is 04:56.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.