Building under FreeBSD 6.1 fails

Help
2006-07-17
2012-09-14
  • Robert Nilsson

    Robert Nilsson - 2006-07-17

    When trying to compile under FreeBSD 6.1 the make fails because of the include file sys/file.h.

    ./configure reports this:

    checking for string.h... (cached) yes
    checking sys/file.h usability... no
    checking sys/file.h presence... yes
    configure: WARNING: sys/file.h: present but cannot be compiled
    configure: WARNING: sys/file.h: check for missing prerequisite headers?
    configure: WARNING: sys/file.h: see the Autoconf documentation
    configure: WARNING: sys/file.h: section "Present But Cannot Be Compiled"
    configure: WARNING: sys/file.h: proceeding with the preprocessor's result
    configure: WARNING: sys/file.h: in the future, the compiler will take precedence
    configure: WARNING: ## ------------------------------------------ ##
    configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists. ##
    configure: WARNING: ## ------------------------------------------ ##
    checking for sys/file.h... yes

    Make:

    gcc -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/usr/local/include -I../include -fexceptions -Wall -W -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wredundant-decls -D_FILE_OFFSET_BITS=64 -DEXTENSIONS -g -O2 -D_THREAD_SAFE -pthread -D_XOPEN_SOURCE=500 -MT compat.lo -MD -MP -MF .deps/compat.Tpo -c compat.c -fPIC -DPIC -o .libs/compat.o
    In file included from ../include/ow.h:102,
    from compat.c:14:
    /usr/include/sys/file.h:154: error: syntax error before "u_int"
    *** Error code 1

    If I remove -D_XOPEN_SOURCE=500 everything compiles perfectly. In fact, I created a test.c application, included sys/file.h, and it failed to compil with that option selected.

    Is there a major issue in removing that setting?

    Rob.

     
    • Robert Nilsson

      Robert Nilsson - 2006-07-18

      Compiled as above, with libusb installed, I get the following error when running:

      testbox# owhttpd -p 3001 --error_print 2 --error_level 4 -u -F
      CALL: PARSENAME path=[]
      CONNECT: Adapter found: /dev/usb0//dev/ugen0
      DEFAULT: Opened USB DS9490 adapter at /dev/usb0//dev/ugen0.
      DEFAULT: DS9490_open: usb_clear_halt failed ret=1
      DATA: BUS_first: No data will be returned
      DATA: DS9490_reset
      DATA: BUS_first failed during connect [-1/-1]

      Also, it binds owhttpd to TCP6, but no to TCP4.

       
    • Robert Nilsson

      Robert Nilsson - 2006-07-18

      On the web I found a reference that mentioned including this define:

      define __BSD_VISIBLE 1

      before a call to sys/type.h will correct this issue. I added it to ow.h and it now compiles (who know if I broke anything...).

      I do get a log of these messages:

      /usr/local/include/usb.h:285: warning: declaration of 'index' shadows a global declaration
      /usr/include/strings.h:50: warning: shadowed declaration is here

      during the compile.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks