Compile errors on OpenSolaris

Get help, report and discuss bugs.
Post Reply
spanky

Compile errors on OpenSolaris

Post by spanky » 29 Dec 2008, 20:01

Greetings.
I'm attempting to compile on OpenSolaris (Solaris Express CE b104 - gcc 3.4.3), but I'm getting errors....
I've successfully built and installed the following prerequisites:
- libsigc++-2.0.18 (updated)
- gnutls-2.6.3
- libpar2-0.2
.configure goes great -- all set to go..
Unfortunately, make provides the following:
...
...
ArticleDownloader.cpp: In member function 'void ArticleDownloader::LogDebugInfo()':
/usr/include/time.h:285: error: too many arguments to function 'char* ctime_r(const time_t*, char*)'
ArticleDownloader.cpp:760: error: at this point in file
*** Error code 1
make: Fatal error: Command failed for target 'ArticleDownloader.o'
...

Any ideas? Thanks in advance!

hugbug
Developer & Admin
Posts: 7529
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Compile errors on OpenSolaris

Post by hugbug » 05 Jan 2009, 14:55

You could coment out the complete content of function ArticleDownloader::LogDebugInfo(), because it is used only for debug purposes. However there are other places, where the function ctime_r is necessary. The configure-sc ript should detect how to call ctime_r properly, but it seems to not working on your OS.
You could try to change DEFINES "HAVE_CTIME_R_2" and "HAVE_CTIME_R_3" in file "config.h" after configuring (before calling make). One of DEFINES should be defined, whereis the other one - not (undef xxx).

Do you know if there is a vmware-image for your OS available? I could try to compile and fix errors.

spanky

Re: Compile errors on OpenSolaris

Post by spanky » 10 Jan 2009, 20:06

Thanks for your reply. I don't know of any pre-packaged vm's for this specific release.
.. I gave up (sort-of)..

I'm now running Debian Etch inside a Solaris zone on that machine. So I have NZBGet running on Etch, and I've put the web front-end on the Solaris host.
Seems to be working well so far.

Guest

Re: Compile errors on OpenSolaris

Post by Guest » 30 Jan 2009, 19:10

Change the lines

Code: Select all

ctime_r(&m_tLastUpdateTime, szTime, 50);
to

Code: Select all

ctime_r(&m_tLastUpdateTime, szTime);
Works for me on Solaris 10

hugbug
Developer & Admin
Posts: 7529
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Compile errors on OpenSolaris

Post by hugbug » 30 Jan 2009, 19:40

Guest:
1. Have you replaced the code only in ArticleDownloader.cpp or also in Log.cpp and NCursesFrontend.cpp?

2. Can you please post the output of configure script and the generated config.h file?
I'd like to find out why configure don't detect the right syntax for "ctime_r" (there is a special check for it in the script).

rysse
Posts: 2
Joined: 01 Feb 2009, 17:51

Re: Compile errors on OpenSolaris

Post by rysse » 01 Feb 2009, 18:13

Ad 1) I replaced all occurrences in the files you mentioned. I could have modified the defines in config.h but since it get overwritten I modified the cpp instead.

Ad 2) I have attached configure.out and config.h from an unmodified r277.

Thanks for taking the time to sort out this issue.
Attachments
nzbget_configure_output.zip
(2.2 KiB) Downloaded 74 times

hugbug
Developer & Admin
Posts: 7529
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Compile errors on OpenSolaris

Post by hugbug » 01 Feb 2009, 23:06

rysse
Thanks.

Fixed in r278.

rysse
Posts: 2
Joined: 01 Feb 2009, 17:51

Re: Compile errors on OpenSolaris

Post by rysse » 07 Feb 2009, 20:49

Works perfectly. Thanks!

Btw, I had to append a few libs manually in order to get it to link ( -lrt -lcrypto ). I'm not sure if my environment is to blame for this. I'll try with a fresh installation when I get a chance.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests