[GRASS-dev] [GRASS GIS] #2047: GRASS doesn't build on FreeBSD

GRASS GIS trac at osgeo.org
Mon Jul 29 13:51:32 PDT 2013


#2047: GRASS doesn't build on FreeBSD
-------------------------+--------------------------------------------------
 Reporter:  lbartoletti  |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  blocker      |   Milestone:  6.4.3                    
Component:  Compiling    |     Version:  6.4.3 RCs                
 Keywords:               |    Platform:  Other Unix               
      Cpu:  x86-64       |  
-------------------------+--------------------------------------------------

Comment(by mmetz):

 Replying to [comment:1 glynn]:
 > Replying to [ticket:2047 lbartoletti]:
 Testing on FreeBSD 9.0.1 with gcc (GCC) 4.2.1 20070813 patched [FreeBSD]
 >
 > So something producing errors in the ISO C headers. The log file doesn't
 make any mention of which directory is compiled when the errors occur, but
 it looks like lib/python/ctypes, in which case the problem is with the
 flags that ctypesgen is passing to the preprocessor.
 >
 {{{
 /usr/include/stdarg.h:72:2: error: #error this file needs to be ported to
 your
 compiler
 }}}

 /usr/include/stdarg.h is protected by !__GNUCLIKE_BUILTIN_STDARG. Adding
 {{{
 CFLAGS="-D__GNUCLIKE_BUILTIN_STDARG"
 }}}
 to the call to configure and hacking lib/python/ctypes/Makefile#L57 by
 adding $(CFLAGS) removes this error message. I was not able to spot a
 relevant difference between compiling lib/gis (which succeeds) and
 lib/python/ctypes, apart from gcc vs. gcc -E. I was also not able to find
 any documentation on !__GNUCLIKE_BUILTIN_STDARG?

 >
 > and
 >
 {{{
 Error: /usr/include/stdio.h:67: Syntax error at 'va_list'
 }}}
 >
 I get ctypes Syntax errors also on GNU/Linux, they appear to be harmless.
 It seems that these syntax errors are either indeed harmless and there is
 a bug in the ctypes C code parser, or these syntax errors are real,
 violating some yet unknown standard.
 >
 > This needs to be debugged by someone with access to the target system.

 I will test on FreeBSD 9.1 next week.

 BTW, the standard FreeBSD C compiler clang bombs out for me in lib/gis
 with
 {{{
 fatal error: error in backend: ran out of registers during register
 allocation
 }}}
 unless I set CFLAGS="-D__GNUCLIKE_BUILTIN_STDARG".

 I can test on different FreeBSD versions, but I am not familiar with the
 intricacies of compiling GNU software on FreeBSD, thus I would appreciate
 very much some hints in order to get GRASS working on FreeBSD, ideally
 *BSD. BTW, GRASS 7 with standard functionality (modules + GUI without GUI
 components requiring ctypes) is working fine for me on FreeBSD 9.1.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2047#comment:2>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list