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

#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 |
-------------------------+--------------------------------------------------
We have an error "__va_list" into gisdefs.h

See the log and the FreshPorts' info
http://www.freshports.org/databases/grass

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2047&gt;
GRASS GIS <http://grass.osgeo.org>

#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 glynn):

Replying to [ticket:2047 lbartoletti]:
{{{
/usr/include/stdarg.h:72:2: error: #error this file needs to be ported to
your
compiler
}}}
and
{{{
Error: /usr/include/stdio.h:67: Syntax error at 'va_list'
}}}

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.

This needs to be debugged by someone with access to the target system.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2047#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#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&gt;
GRASS GIS <http://grass.osgeo.org>

#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 lbartoletti):

Seems to be only on Amd64 :

[https://redports.org/~lbartoletti/20130801210200-5456-135536/grass-6.4.3.log
i386 log]
[https://redports.org/~lbartoletti/20130802050627-08551-135559/grass-6.4.3.log
amd64 log]

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2047#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2047: GRASS doesn't build on FreeBSD
-------------------------+--------------------------------------------------
Reporter: lbartoletti | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.4
Component: Compiling | Version: svn-releasebranch64
Keywords: | Platform: Other Unix
      Cpu: x86-64 |
-------------------------+--------------------------------------------------
Changes (by neteler):

  * version: 6.4.3 RCs => svn-releasebranch64
  * milestone: 6.4.3 => 6.4.4

Comment:

Could you try with a recent SVN snapshot?

http://grass.osgeo.org/grass64/source/snapshot/

(I am not sure if this report is actually a blocker for 6.4.4)

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2047#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#2047: GRASS doesn't build on FreeBSD
-------------------------+--------------------------------------------------
Reporter: lbartoletti | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.4
Component: Compiling | Version: svn-releasebranch64
Keywords: FreeBSD | Platform: Other Unix
      Cpu: x86-64 |
-------------------------+--------------------------------------------------
Changes (by neteler):

  * keywords: => FreeBSD
  * priority: blocker => critical

Comment:

Replying to [comment:4 neteler]:
> Could you try with a recent SVN snapshot?
>
> http://grass.osgeo.org/grass64/source/snapshot/
>
> (I am not sure if this report is actually a blocker for 6.4.4)

No answer, downgrading to critical since only Amd64 might be affected.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2047#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

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

Comment(by lbartoletti):

I worked on porting the application. Although Grass works very well, we
still have this error.
https://redports.org/buildarchive/20140109062917-24686/

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2047#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

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

Comment(by neteler):

Replying to [comment:6 lbartoletti]:
> I worked on porting the application. Although Grass works very well, we
still have this error.
> https://redports.org/buildarchive/20140109062917-24686/

Since the link is expired, to you have a new one?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2047#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#2047: GRASS doesn't build on FreeBSD
--------------------------+-------------------------------------------------
  Reporter: lbartoletti | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: critical | Milestone: 6.4.4
Component: Compiling | Version: svn-releasebranch64
Resolution: fixed | Keywords: FreeBSD
  Platform: Other Unix | Cpu: x86-64
--------------------------+-------------------------------------------------
Changes (by lbartoletti):

  * status: new => closed
  * resolution: => fixed

Comment:

Logs for FreeBSD 9.x 10.x 11.x i386 and Amd64

https://redports.org/buildarchive/20140428171001-71581/

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2047#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>