Fedora FC9: Compile error - ctime_r function

Get help, report and discuss bugs.
Post Reply
likeatim

Fedora FC9: Compile error - ctime_r function

Post by likeatim » 27 Jun 2008, 12:54

Hi,

I'm trying to compile on Fedora Core 9 and I'm having trouble with the ctime_r function - I don't know which dependency is missing. A package "time" is installed.
I googled for ctime_r errors, but there's no information on that specific error. The other dependencies of nzbget are met, including the devel packages... I don't get it.
Anyone have any idea?

Thanks so much.

Here's my output:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... no
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... unsupported
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ranlib... ranlib
checking whether make sets $(MAKE)... (cached) yes
checking for false... /bin/false
checking for true... /bin/true
checking for rm... /bin/rm
checking for ln... /bin/ln
checking for tar... /bin/tar
checking for ar... /usr/bin/ar
checking for make... /usr/bin/make
checking for cpp... /usr/bin/cpp
checking for mv... /bin/mv
checking for mkdir... /bin/mkdir
checking for cp... /bin/cp
checking for a BSD-compatible install... /usr/bin/install -c
checking for library containing pthread_create... no
checking for library containing socket... no
checking for library containing inet_addr... no
checking for library containing gethostbyname_r... no
checking for library containing hstrerror... no
checking for getopt_long... no
checking for stat64... no
checking for ctime_r... no
configure: error: "function ctime_r not found."

hugbug

RE: Fedora FC9: Compile error - ctime_r function

Post by hugbug » 27 Jun 2008, 13:41

It's not just "ctime_r". Other libraries and functions were also not found (pthread_create, getopt_long, etc).

Is it gcc 4.3 ?

likeatim

RE: Fedora FC9: Compile error - ctime_r function

Post by likeatim » 27 Jun 2008, 13:51

Yes, gcc-4.3.0-8 and gcc-c++-4.3.0-8

hugbug

RE: Fedora FC9: Compile error - ctime_r function

Post by hugbug » 27 Jun 2008, 13:57

There is a patch for gcc 4.3 in patch-section. But it does not update the configure-script (and therefore will not resolve your problem).

If you have any chance to replace 4.3 with 4.2 (or older version) it should help.

Is 4.3 the default compiler version on Fedora FC9?

likeatim

RE: Fedora FC9: Compile error - ctime_r function

Post by likeatim » 27 Jun 2008, 15:14

yes, 4.3. is default, it's a vanilla FC9 installation...

hugbug

RE: Fedora FC9: Compile error - ctime_r function

Post by hugbug » 27 Jun 2008, 17:06

1. Install all required packages with:

yum install gcc g++ make patch libxml2 libpar2 libxml2-devel libpar2-devel ncurses-devel

2. Download the patch for gcc-4.3 from the patch-section (https://sourceforge.net/tracker/index.p ... tid=632378). Thanks to Paul Bredbury (brebs) for the patch.

3. Put the patch into nzbget-source-directory, change to this directory and apply the patch:

patch < nzbget-0.4.0-gcc43.diff

4. Disable default compiler flags with following command (note a space-char between quotation marks):

export CFLAGS=" "

5. Configure and compile as usual:

./configure
make

hugbug

RE: Fedora FC9: Compile error - ctime_r function

Post by hugbug » 27 Jun 2008, 20:14

All problems fixed. The revision 185 from subversion-repository works under gcc 4.3 and should work on Fedora FC9 as well.

likeatim

RE: Fedora FC9: Compile error - ctime_r function

Post by likeatim » 28 Jun 2008, 09:34

thanks!
I couldn't try it because now your subversion repository complains my svn client (1.4.6.) is too old to check out the directory.... ?!
Now I have to figure out that first. Linux, and endless cycle of self-sufficient burning of time ;)

likeatim

RE: Fedora FC9: Compile error - ctime_r function

Post by likeatim » 28 Jun 2008, 11:46

thanks hugbug for the snapshot!
it now compiled without errors. cool!

Post Reply

Who is online

Users browsing this forum: No registered users and 45 guests