Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 01-07-2010, 12:04   #46
Registered User

Join Date: Jan 2010
Location: Gothenburg, Sweden
Boat: Marieholm IF "Ida"
Posts: 10
Forgot; when selecting (right-clicking) a waypoint and choosing "go to here", openCPN creates a new waypoint on top of the old one. Should it not use the selected waypoint?

Best Regards and thank you for a great program ,

Jakobsson
Jakobsson is offline   Reply With Quote
Old 02-07-2010, 02:22   #47
Registered User

Join Date: Aug 2009
Posts: 211
Quote:
Originally Posted by Jakobsson View Post
...everything worked fine, except for the occasional "gf pours a bottle of beer over the keyboard incident"...
Ah the old gf bug. It's been around for years and can affect anything electrical/mechanical/complicated/etc. The best scientists in the world have been working on this issue for years.

Alas, no fix has yet been developed







ColdFusion is offline   Reply With Quote
Old 02-07-2010, 15:02   #48
Registered User

Join Date: Aug 2009
Posts: 189
Hi Dave,

I have uninstalled opencpn_2.1.624a-1_i386.deb. Network LIBGPS was working fine after your help.
I have installed Opencpn again from cvs and as for the first time, I don't get Network LIBGPS in the drop-down list. Only Network GPSD and it is not working.
If I uninstall it and reinstall opencpn_2.1.624a-1_i386.deb, I get Network LIBGPS and all is working fine again.
It seems that I have a problem with cvs installation because I have not seen anybody complaining about that.

Jean-Pierre
jpiebrig is offline   Reply With Quote
Old 03-07-2010, 01:09   #49
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
jpiebrig

One reason could be a "stale" CMakeCache.txt file. Try to delete this file and compile again. An other alternative is to try my script in the "Git" thread. Notice that the CMakeCache file is deleted before compiling.
CVS will not be used for future updates of the source code, so you will have to change to git soon anyway.

Thomas
cagney is offline   Reply With Quote
Old 03-07-2010, 04:59   #50
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Dave

Something strange is going on with libgps. From time to time I get the warning below about mismatch. Today after using the program without a problem together with the gps, I got this warning when once again starting the program with xgps running. I did not matter what I did, the only way I got back to normality was to restart the computer.
It was not the config file, restarting OpenCPN did not help. Setting a different port, and then back to Network Libgps did not help either.
I don't think it's a question about a stale CmakeCache either, as I delete this file with each compilation. What I did not do was to restart gpsd, but as I said xgps was running OK all the time.
By the way I hardly ever get a data stream in the GPS/NMEA window with the GPS running.
I'm attaching the output to stderr with a brand new git repository install, this gives you an idea about how picky of the latest gcc is.

Thomas
Attached Thumbnails
Click image for larger version

Name:	snapshot11.png
Views:	152
Size:	14.5 KB
ID:	17503  
Attached Files
File Type: doc std.error.doc (2.1 KB, 59 views)
cagney is offline   Reply With Quote
Old 03-07-2010, 06:30   #51
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
jpiebrig...

I think you need the libgps development files to compile from source for libgps support.

Code:
sudo apt-get install libgps-dev
Dave
bdbcat is offline   Reply With Quote
Old 03-07-2010, 06:32   #52
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
cagney....

I agree something fishy about libgps.
Inconsistent results from library calls, like you indicate.

I get no response to my queries from gpsd developers. I would like one of the libgps/gpsd crew to look at our code and validate the overall structure.

Anyone know a gpsd/libgps developer?

Dave
bdbcat is offline   Reply With Quote
Old 03-07-2010, 12:27   #53
Registered User

Join Date: Aug 2009
Posts: 189
Dave,

Thanks again, you were true, libgps-dev was missing.
Network LIBGPSD is in the pull-down list and it is working fine with cvs installation.

Cagney,

I have try a lot of time to install Opencpn with git without any success before I ask myself if something was not missing (very slow the guy...).
I have search and I have installed gitk. The installation performs very well with your script and I am ready for the new versions.
Thanks for all.

Jean-Pierre
jpiebrig is offline   Reply With Quote
Old 03-07-2010, 18:28   #54
Registered User
 
CarinaPDX's Avatar

Join Date: Jan 2010
Location: Portland, Oregon, USA
Boat: 31' Cape George Cutter
Posts: 3,283
Contact the gpsd devs on IRC at #gpsd. Almost always someone is awake. Or email requests to gpsd-users@berlios.de.
CarinaPDX is offline   Reply With Quote
Old 03-07-2010, 18:35   #55
Registered User
 
CarinaPDX's Avatar

Join Date: Jan 2010
Location: Portland, Oregon, USA
Boat: 31' Cape George Cutter
Posts: 3,283
Building on OS X

I have just grabbed today's git master. Trying to build it on OS X 10.6.4.

Here is my first issue:

/usr/local/src/opencpn-git/opencpn/src/nmea.cpp: In member function 'virtual void* OCP_NMEA_Thread::Entry()':
/usr/local/src/opencpn-git/opencpn/src/nmea.cpp:1003: error: cannot convert 'const char*' to 'const wxChar*' for argument '5' to 'void wxOnAssert(const wxChar*, int, const char*, const wxChar*, const wxChar*)'
/usr/local/src/opencpn-git/opencpn/src/nmea.cpp:1013: error: cannot convert 'const char*' to 'const wxChar*' for argument '5' to 'void wxOnAssert(const wxChar*, int, const char*, const wxChar*, const wxChar*)'
make[2]: *** [CMakeFiles/NMEA0183.dir/src/nmea.cpp.o] Error 1

I agree with the compiler that the types do not match.

There is a diff to fix that:

*** nmea.cpp Sat Jul 3 18:21:52 2010
--- nmea.cpp.DIST Sat Jul 3 18:16:11 2010
***************
*** 1000,1006 ****
if((tptr - rx_buffer) > RX_BUFFER_SIZE)
tptr = rx_buffer;

! wxASSERT_MSG((ptmpbuf - temp_buf) < RX_BUFFER_SIZE, (const wxChar*)"temp_buf overrun1");

}

--- 1000,1006 ----
if((tptr - rx_buffer) > RX_BUFFER_SIZE)
tptr = rx_buffer;

! wxASSERT_MSG((ptmpbuf - temp_buf) < RX_BUFFER_SIZE, "temp_buf overrun1");

}

***************
*** 1010,1016 ****
if((tptr - rx_buffer) > RX_BUFFER_SIZE)
tptr = rx_buffer;

! wxASSERT_MSG((ptmpbuf - temp_buf) < RX_BUFFER_SIZE, (const wxChar*)"temp_buf overrun2");

*ptmpbuf = 0;

--- 1010,1016 ----
if((tptr - rx_buffer) > RX_BUFFER_SIZE)
tptr = rx_buffer;

! wxASSERT_MSG((ptmpbuf - temp_buf) < RX_BUFFER_SIZE, "temp_buf overrun2");

*ptmpbuf = 0;


Next bug in next message.

BTW, not my account, I'm posting from my brothers account here. - GEM
CarinaPDX is offline   Reply With Quote
Old 03-07-2010, 19:21   #56
Registered User
 
CarinaPDX's Avatar

Join Date: Jan 2010
Location: Portland, Oregon, USA
Boat: 31' Cape George Cutter
Posts: 3,283
OS X build error

Next error on OS X:

[ 31%] Building CXX object CMakeFiles/S57ENC.dir/src/mygeom.cpp.o
/usr/local/src/opencpn-git/opencpn/src/mygeom.cpp:97:16: error: gl.h: No such file or directory
/usr/local/src/opencpn-git/opencpn/src/mygeom.cpp:98:17: error: glu.h: No such file or directory

Those are sitting nicely in the standard location: /usr/X11/include/GL

My first ever hack to CMakeList.txt:

# diff -c CMakeLists.txt.DIST CMakeLists.txt
*** CMakeLists.txt.DIST Sat Jul 3 19:04:47 2010
--- CMakeLists.txt Sat Jul 3 19:16:57 2010
***************
*** 313,318 ****
--- 313,319 ----
SET(SRCS ${SRCS} src/opencpn.rc)
ENDIF(WIN32)
IF(APPLE)
+ INCLUDE_DIRECTORIES(/usr/X11/include /usr/X11/include/GL)
SET(SRCS ${SRCS}
src/macsercomm.cpp
src/macutils.c
CarinaPDX is offline   Reply With Quote
Old 03-07-2010, 22:58   #57
Registered User
 
CarinaPDX's Avatar

Join Date: Jan 2010
Location: Portland, Oregon, USA
Boat: 31' Cape George Cutter
Posts: 3,283
OS X errors

Just one last file that will not commpile on OS X. Bascically another char is not wxChar thing. Here is the patch to fix that:

# diff -c macsercomm.cpp macsercomm.cpp.DIST
*** macsercomm.cpp Sat Jul 3 19:32:17 2010
--- macsercomm.cpp.DIST Sat Jul 3 19:30:08 2010
***************
*** 65,71 ****
m_fileDescriptor = open(m_pszPortName, O_RDWR | O_NOCTTY | O_NONBLOCK);
if (m_fileDescriptor == -1)
{
! wxLogMessage( (const wxChar*)"Error opening serial port %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
return false ;
}
--- 65,71 ----
m_fileDescriptor = open(m_pszPortName, O_RDWR | O_NOCTTY | O_NONBLOCK);
if (m_fileDescriptor == -1)
{
! wxLogMessage("Error opening serial port %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
return false ;
}
***************
*** 77,83 ****

if (ioctl(m_fileDescriptor, TIOCEXCL) == -1)
{
! wxLogMessage( (const wxChar*)"Error setting TIOCEXCL on %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
--- 77,83 ----

if (ioctl(m_fileDescriptor, TIOCEXCL) == -1)
{
! wxLogMessage("Error setting TIOCEXCL on %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
***************
*** 92,98 ****

if (fcntl(m_fileDescriptor, F_SETFL, 0) == -1)
{
! wxLogMessage( (const wxChar*)"Error clearing O_NONBLOCK %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
--- 92,98 ----

if (fcntl(m_fileDescriptor, F_SETFL, 0) == -1)
{
! wxLogMessage("Error clearing O_NONBLOCK %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
***************
*** 105,111 ****
// Get the current options and save them so we can restore the default settings later.
if (tcgetattr(m_fileDescriptor, &m_OriginalTTYAttrs) == -1)
{
! wxLogMessage( (const wxChar*)"Error getting tty attributes %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
--- 105,111 ----
// Get the current options and save them so we can restore the default settings later.
if (tcgetattr(m_fileDescriptor, &m_OriginalTTYAttrs) == -1)
{
! wxLogMessage("Error getting tty attributes %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
***************
*** 135,141 ****
// See tcsendbreak(3) ("man 3 tcsendbreak") for details.
if (tcdrain(m_fileDescriptor) == -1)
{
! wxLogMessage( (const wxChar*)"Error waiting for drain - %s(%d).\n",
strerror(errno), errno);
}

--- 135,141 ----
// See tcsendbreak(3) ("man 3 tcsendbreak") for details.
if (tcdrain(m_fileDescriptor) == -1)
{
! wxLogMessage("Error waiting for drain - %s(%d).\n",
strerror(errno), errno);
}

***************
*** 144,150 ****
// was saved.
if (tcsetattr(m_fileDescriptor, TCSANOW, &m_OriginalTTYAttrs) == -1)
{
! wxLogMessage( (const wxChar*)"Error resetting tty attributes - %s(%d).\n",
strerror(errno), errno);
}
close(m_fileDescriptor);
--- 144,150 ----
// was saved.
if (tcsetattr(m_fileDescriptor, TCSANOW, &m_OriginalTTYAttrs) == -1)
{
! wxLogMessage("Error resetting tty attributes - %s(%d).\n",
strerror(errno), errno);
}
close(m_fileDescriptor);
***************
*** 178,185 ****
// Print the current input and output baud rates.
// See tcsetattr(4) ("man 4 tcsetattr") for details.

! wxLogMessage( (const wxChar*)"Current input baud rate is %d\n", (int) cfgetispeed(&options));
! wxLogMessage( (const wxChar*)"Current output baud rate is %d\n", (int) cfgetospeed(&options));

// Set raw input (non-canonical) mode, with reads blocking until either a single character
// has been received or a one second timeout expires.
--- 178,185 ----
// Print the current input and output baud rates.
// See tcsetattr(4) ("man 4 tcsetattr") for details.

! wxLogMessage("Current input baud rate is %d\n", (int) cfgetispeed(&options));
! wxLogMessage("Current output baud rate is %d\n", (int) cfgetospeed(&options));

// Set raw input (non-canonical) mode, with reads blocking until either a single character
// has been received or a one second timeout expires.
***************
*** 202,214 ****
// the current baud rate if the IOSSIOSPEED ioctl was used but will instead return the speed set by the last call
// to cfsetspeed.

! wxLogMessage( (const wxChar*)"Input baud rate changed to %d\n", (int) cfgetispeed(&options));
! wxLogMessage( (const wxChar*)"Output baud rate changed to %d\n", (int) cfgetospeed(&options));

// Cause the new options to take effect immediately.
if (tcsetattr(m_fileDescriptor, TCSANOW, &options) == -1)
{
! wxLogMessage( (const wxChar*)"Error setting tty attributes %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
goto error;
}
--- 202,214 ----
// the current baud rate if the IOSSIOSPEED ioctl was used but will instead return the speed set by the last call
// to cfsetspeed.

! wxLogMessage("Input baud rate changed to %d\n", (int) cfgetispeed(&options));
! wxLogMessage("Output baud rate changed to %d\n", (int) cfgetospeed(&options));

// Cause the new options to take effect immediately.
if (tcsetattr(m_fileDescriptor, TCSANOW, &options) == -1)
{
! wxLogMessage("Error setting tty attributes %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
goto error;
}
***************
*** 218,230 ****

if (ioctl(m_fileDescriptor, TIOCSDTR) == -1) // Assert Data Terminal Ready (DTR)
{
! wxLogMessage( (const wxChar*)"Error asserting DTR %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}

if (ioctl(m_fileDescriptor, TIOCCDTR) == -1) // Clear Data Terminal Ready (DTR)
{
! wxLogMessage( (const wxChar*)"Error clearing DTR %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}

--- 218,230 ----

if (ioctl(m_fileDescriptor, TIOCSDTR) == -1) // Assert Data Terminal Ready (DTR)
{
! wxLogMessage("Error asserting DTR %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}

if (ioctl(m_fileDescriptor, TIOCCDTR) == -1) // Clear Data Terminal Ready (DTR)
{
! wxLogMessage("Error clearing DTR %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}

***************
*** 232,238 ****
if (ioctl(m_fileDescriptor, TIOCMSET, &handshake) == -1)
// Set the modem lines depending on the bits set in handshake
{
! wxLogMessage( (const wxChar*)"Error setting handshake lines %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}

--- 232,238 ----
if (ioctl(m_fileDescriptor, TIOCMSET, &handshake) == -1)
// Set the modem lines depending on the bits set in handshake
{
! wxLogMessage("Error setting handshake lines %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}

***************
*** 242,252 ****
if (ioctl(m_fileDescriptor, TIOCMGET, &handshake) == -1)
// Store the state of the modem lines in handshake
{
! wxLogMessage( (const wxChar*)"Error getting handshake lines %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}

! wxLogMessage( (const wxChar*)"Handshake lines currently set to %d\n", handshake);

// Success
return m_fileDescriptor;
--- 242,252 ----
if (ioctl(m_fileDescriptor, TIOCMGET, &handshake) == -1)
// Store the state of the modem lines in handshake
{
! wxLogMessage("Error getting handshake lines %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}

! wxLogMessage("Handshake lines currently set to %d\n", handshake);

// Success
return m_fileDescriptor;
***************
*** 285,295 ****

if (numBytes == -1)
{
! wxLogMessage( (const wxChar*)"Error writing to modem - %s(%d).\n", strerror(errno), errno);
}
else
{
! wxLogMessage( (const wxChar*)"Wrote %ld bytes\n", numBytes);
}
}
return bool(numBytes == dwSize) ;
--- 285,295 ----

if (numBytes == -1)
{
! wxLogMessage("Error writing to modem - %s(%d).\n", strerror(errno), errno);
}
else
{
! wxLogMessage("Wrote %ld bytes\n", numBytes);
}
}
return bool(numBytes == dwSize) ;
CarinaPDX is offline   Reply With Quote
Old 04-07-2010, 14:00   #58
Registered User
 
CarinaPDX's Avatar

Join Date: Jan 2010
Location: Portland, Oregon, USA
Boat: 31' Cape George Cutter
Posts: 3,283
OS X errors

After the previous patch I found that I needed the newest wxWidgets from MacPorts, not the one that is in Snow Lepoard. Problem is that wxWidgets is an i386 app, not an x86_64 app. So after this patch I can compile and link
OpenCPN on OS X.

# diff -c CMakeLists.txt CMakeLists.txt.DIST
*** CMakeLists.txt Sun Jul 4 13:53:48 2010
--- CMakeLists.txt.DIST Sat Jul 3 19:04:47 2010
***************
*** 313,327 ****
SET(SRCS ${SRCS} src/opencpn.rc)
ENDIF(WIN32)
IF(APPLE)
- INCLUDE_DIRECTORIES(/usr/X11/include /usr/X11/include/GL)
- SET(CMAKE_C_FLAGS_DEBUG "-O2 -arch i386")
- SET(CMAKE_C_FLAGS_MINSIZEREL "-O2 -arch i386")
- SET(CMAKE_C_FLAGS_RELEASE "-O2 -arch i386")
- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -arch i386")
- SET(CMAKE_CXX_FLAGS_DEBUG "-O2 -arch i386")
- SET(CMAKE_CXX_FLAGS_MINSIZEREL "-O2 -arch i386")
- SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -arch i386")
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -arch i386")
SET(SRCS ${SRCS}
src/macsercomm.cpp
src/macutils.c
--- 313,318 ----
CarinaPDX is offline   Reply With Quote
Old 04-07-2010, 14:47   #59
Registered User
 
CarinaPDX's Avatar

Join Date: Jan 2010
Location: Portland, Oregon, USA
Boat: 31' Cape George Cutter
Posts: 3,283
Sorry, got the diff backwards, here is the right way:

# diff -c CMakeLists.txt.DIST CMakeLists.txt
*** CMakeLists.txt.DIST Sat Jul 3 19:04:47 2010
--- CMakeLists.txt Sun Jul 4 13:53:48 2010
***************
*** 313,318 ****
--- 313,327 ----
SET(SRCS ${SRCS} src/opencpn.rc)
ENDIF(WIN32)
IF(APPLE)
+ INCLUDE_DIRECTORIES(/usr/X11/include /usr/X11/include/GL)
+ SET(CMAKE_C_FLAGS_DEBUG "-O2 -arch i386")
+ SET(CMAKE_C_FLAGS_MINSIZEREL "-O2 -arch i386")
+ SET(CMAKE_C_FLAGS_RELEASE "-O2 -arch i386")
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -arch i386")
+ SET(CMAKE_CXX_FLAGS_DEBUG "-O2 -arch i386")
+ SET(CMAKE_CXX_FLAGS_MINSIZEREL "-O2 -arch i386")
+ SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -arch i386")
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -arch i386")
SET(SRCS ${SRCS}
src/macsercomm.cpp
src/macutils.c
CarinaPDX is offline   Reply With Quote
Old 04-07-2010, 15:28   #60
Registered User
 
CarinaPDX's Avatar

Join Date: Jan 2010
Location: Portland, Oregon, USA
Boat: 31' Cape George Cutter
Posts: 3,283
Hi,

My brother has pretty much done what he can/will do for us. I have applied his patches as previously posted and can confirm that the program builds on the Mac, with a fair few warnings. I did this by using MacPorts to install Cmake and wxWidgets (stable-2.8.11 - no patch required for the Mac with this version). The resulting build is thus linked to this library, not included in the build.

When executing the app the database was rebuilt (all US ENC + RNC, Cmap 1/10) and a raster chart was displayed before crashing. The crash report and the build report are attached here if someone more knowledgeable wants to look at it. That is about as much as can be contributed from here. If someone wants to pick it up I will be happy to help in any way I can.

Greg
Attached Files
File Type: pdf BuildReport.pdf (31.1 KB, 55 views)
File Type: pdf CrashReport.pdf (34.2 KB, 69 views)
CarinaPDX is offline   Reply With Quote
Reply


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
Keel discussion RandyAbernethy General Sailing Forum 93 18-02-2023 22:35
Icon Discussion manimaul OpenCPN 25 25-05-2010 05:03
Why another discussion board? Gisle Forum News & Announcements 5 24-02-2003 06:55

Advertise Here


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


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.