 |
|
16-03-2010, 00:17
|
#1
|
Registered User
Join Date: Sep 2007
Location: FL
Boat: Pacific Seacraft 31 - Cielo Azul
Posts: 360
|
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
|
|
|
17-03-2010, 11: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
|
|
|
17-03-2010, 11:06
|
#3
|
Registered User
Join Date: Feb 2010
Location: Saint Petersburg, Russia
Posts: 66
|
Quote:
Originally Posted by cagney
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)
|
|
|
18-03-2010, 19:40
|
#4
|
Registered User
Join Date: Sep 2007
Location: FL
Boat: Pacific Seacraft 31 - Cielo Azul
Posts: 360
|
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
|
|
|
19-03-2010, 03:30
|
#5
|
Registered User
Join Date: Feb 2010
Location: Saint Petersburg, Russia
Posts: 66
|
Quote:
Originally Posted by teejayevans
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
|
|
|
19-03-2010, 11: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
|
|
|
21-03-2010, 18:15
|
#7
|
Registered User
Join Date: Sep 2007
Location: FL
Boat: Pacific Seacraft 31 - Cielo Azul
Posts: 360
|
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
|
|
|
22-03-2010, 10: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
|
|
|
23-03-2010, 17: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:83: warning: ‘typedef’ was ignored in this declaration
src/chcanv.cpp:6850: error: prototype for ‘ocpCursor::ocpCursor(char**, long int, int, int)’ does not match any in class ‘ocpCursor’
././include/chcanv.h:628: error: candidates are: ocpCursor::ocpCursor(const ocpCursor&)
././include/chcanv.h:632: error: ocpCursor::ocpCursor(const char**, long int, int, int)
src/chcanv.cpp:6697: error: ocpCursor::ocpCursor(const wxString&, long int, int, int)
make: *** [chcanv.o] Error 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.
|
|
|
23-03-2010, 20:42
|
#10
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,712
|
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
|
|
|
23-03-2010, 23: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....
|
|
|
24-03-2010, 05: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!
|
|
|
24-03-2010, 15: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:23: error: wx/wxprec.h: No 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.h
Back to paint scraping!
|
|
|
24-03-2010, 16:03
|
#14
|
Registered User
Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
|
You need wxGTK and wxGTK-devel.
|
|
|
24-03-2010, 16:07
|
#15
|
Registered User
Join Date: Mar 2010
Posts: 14
|
Sorry, meant to say installed wxgtk-devel!
|
|
|
 |
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|