Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: devel/doxygen broken on macppc-current?



John D. Baker wrote:
>On Tue, 26 Jul 2016, John D. Baker wrote:
>
>> The resulting core file produces:
>> 
>> Core was generated by `doxygen'.
>> Program terminated with signal SIGSEGV, Segmentation fault.
>> #0  0x01b8532c in QTime::currentTime(QTime*) ()
>> (gdb) bt
>> #0  0x01b8532c in QTime::currentTime(QTime*) ()
>> #1  0x01b85470 in QTime::start() ()
>> #2  0x0182e8b4 in initDoxygen() ()
>> #3  0x01c0d1ac in main ()
>
>I just rebuilt "devel/doxygen" and in the final link step noticed this:
>
>[...]
>[100%] Linking CXX executable ../bin/doxygen
>../lib/libqtools.a(qdatetime.cpp.o): In function `QTime::currentTime(QTime*)':
>/var/tmp/pkgsrc/devel/doxygen/work/doxygen-1.8.11/qtools/qdatetime.cpp:899: warning: warning: reference to compatibility gettimeofday(); include <sys/time.h> to generate correct reference
>[100%] Built target doxygen
>=> Unwrapping files-to-be-installed.
>[...]
>
>Looking at the referenced file shows just such an inclusion, and the line
>number referenced is in an OS-specific code block protected by:
>
>  #elif defined(_OS_UNIX_) || defined(_OS_MAC_)
>
>and so forth.

It does include <sys/time.h> but then redeclares a prototype for
gettimeofday() which is why ld(1) complains.

Maybe try something like this:

--- qdatetime.cpp.orig  2014-10-19 16:06:23.000000000 +0100
+++ qdatetime.cpp       2016-07-27 01:09:46.893755645 +0100
@@ -55,9 +55,11 @@
 #elif defined(_OS_UNIX_) || defined(_OS_MAC_)
 #include <sys/time.h>
 #include <unistd.h>
+#ifndef __NetBSD__
 #undef gettimeofday
 extern "C" int gettimeofday( struct timeval *, struct timezone * );
 #endif
+#endif
 
 static const uint FIRST_DAY    = 2361222;      // Julian day for 1752/09/14
 static const int  FIRST_YEAR   = 1752;         // ### wrong for many countries


Home | Main Index | Thread Index | Old Index