Menu

OpenBSD 2.9 compile problems

Porting
2001-08-02
2012-11-20
  • Jeffery S. Adamus

    configure seems to run alright,
    but I am getting errors when i run make
    anybody have any ideas?

    Thanks Jeff

    > ja# make
    > Making all in posix
    > /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.
    > -I../posix    -g
    >  -O2 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -c inaddr.cpp
    > rm -f .libs/inaddr.lo
    > c++ -DHAVE_CONFIG_H -I. -I. -I. -I../posix -g -O2 -D_GNU_SOURCE
    > -D_REENTRANT -D_TH
    > READ_SAFE -c  -fPIC -DPIC inaddr.cpp -o .libs/inaddr.lo
    > In file included from config.h:531,
    >                  from inaddr.cpp:41:
    > /usr/include/sys/socket.h:164: syntax error before `['
    > /usr/include/sys/socket.h:166: syntax error before `['
    > /usr/include/sys/socket.h:174: syntax error before `;'
    > /usr/include/sys/socket.h:319: syntax error before `;'
    > /usr/include/sys/socket.h:383: syntax error before `;'
    > In file included from /usr/include/sys/select.h:42,
    >                  from config.h:536,
    >                  from inaddr.cpp:41:
    > /usr/include/sys/event.h:53: syntax error before `;'
    > /usr/include/sys/event.h:55: syntax error before `;'
    > In file included from config.h:541,
    >                  from inaddr.cpp:41:
    > /usr/include/arpa/inet.h:89: syntax error before `('
    > /usr/include/arpa/inet.h:90: syntax error before `*'
    > In file included from config.h:551,
    >                  from inaddr.cpp:41:
    > /usr/include/sys/un.h:46: syntax error before `;'
    > In file included from inaddr.cpp:47:
    > thread.h:483: syntax error before `;'
    > thread.h: In method `cc_Semaphore::~cc_Semaphore()':
    > thread.h:505: `_semaphore' undeclared (first use this function)
    > thread.h:505: (Each undeclared identifier is reported only once
    > thread.h:505: for each function it appears in.)
    > thread.h:505: implicit declaration of function `int sem_destroy(...)'
    > thread.h: In method `void cc_Semaphore::Wait()':
    > thread.h:524: implicit declaration of function `int sem_wait(...)'
    > thread.h: In method `bool cc_Semaphore::TryWait()':
    > thread.h:541: implicit declaration of function `int sem_trywait(...)'
    > thread.h: In method `void cc_Semaphore::Post()':
    > thread.h:558: implicit declaration of function `int sem_post(...)'
    > In file included from inaddr.cpp:48:
    > socket.h: At top level:
    > socket.h:1808: syntax error before `;'
    > *** Error code 1
    >
    > Stop in /home/jadamus/jadamus/CommonC++-1.5.0/posix.
    > *** Error code 1
    >
    > Stop in /home/jadamus/jadamus/CommonC++-1.5.0 (line 189 of Makefile).
    > ja#
    >

     
    • Stephen J Sullivan

      I have also had this problem using OpenBSD 3.5, and am reluctant to start fiddling with either the OpenBSD or CommonC++ code, and it seems to be complaining about OpenBSD's includes. Any ideas?

       
    • David Sugar

      David Sugar - 2004-12-22

      This has been resolved in the latest release.  It was related to _XOPEN_SOURCES being defined, if I recall correctly.  Anyway, this problem existed both for OpenBSD and NetBSD.  I think it was also in FreeBSD, and if you go to the config.h header and look for the __FreeBSD__ case that covers this, you can do the same change for OpenBSD and NetBSD, and it will work.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.