librelist archives

« back to archive

Error compiling p4est 0.3.4.2 on FreeBSD

Error compiling p4est 0.3.4.2 on FreeBSD

From:
Bruno Turcksin
Date:
2014-08-26 @ 15:18
Hi,

 I'm trying to install p4est but it does not compile. I get the following
error:

In file included from ../../p4est-0.3.4.2/sc/src/sc.
c:23:
In file included from ../../p4est-0.3.4.2/sc/src/sc.h:77:
../../p4est-0.3.4.2/sc/src/sc_c99_functions.h:33:21: error: expected
identifier or '('
int                 fileno (FILE * stream);
                    ^
/usr/include/stdio.h:494:20: note: expanded from macro 'fileno'
#define fileno(p)       (!__isthreaded ? __sfileno(p) : (fileno)(p))
                              ^
In file included from ../../p4est-0.3.4.2/sc/src/sc.c:23:
In file included from ../../p4est-0.3.4.2/sc/src/sc.h:77:
../../p4est-0.3.4.2/sc/src/sc_c99_functions.h:33:21: error: expected ')'
/usr/include/stdio.h:494:20: note: expanded from macro 'fileno'
#define fileno(p)       (!__isthreaded ? __sfileno(p) : (fileno)(p))
                               ^
../../p4est-0.3.4.2/sc/src/sc_c99_functions.h:33:21: note: to match this '('
/usr/include/stdio.h:494:19: note: expanded from macro 'fileno'
#define fileno(p)       (!__isthreaded ? __sfileno(p) : (fileno)(p))
                               ^
2 errors generated.
*** Error code 1


 I used the following configure:

../p4est-0.3.4.2/configure --enable-mpi --enable-shared --disable-vtk
--without-blas --prefix=/home/bruno/Documents
/software/p4est


 mpicc --version:

FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd10.0
Thread model: posix


Best,

Bruno

Re: [p4est] Error compiling p4est 0.3.4.2 on FreeBSD

From:
Carsten Burstedde
Date:
2014-08-26 @ 17:47
>  I'm trying to install p4est but it does not compile. I get the following
> error:

It would probably be best to remove the file sc_c99_functions.h
altogether.  The splint specifics are definitely outdated, and the rest
should be replaced by including appropriate header files.

Would you want to give it a shot and figure out the minimal set of
system headers that's required to compile libsc and p4est on bsd?

Best,

Carsten

> In file included from ../../p4est-0.3.4.2/sc/src/sc.
> c:23:
> In file included from ../../p4est-0.3.4.2/sc/src/sc.h:77:
> ../../p4est-0.3.4.2/sc/src/sc_c99_functions.h:33:21: error: expected
> identifier or '('
> int                 fileno (FILE * stream);
>                     ^
> /usr/include/stdio.h:494:20: note: expanded from macro 'fileno'
> #define fileno(p)       (!__isthreaded ? __sfileno(p) : (fileno)(p))
>                               ^
> In file included from ../../p4est-0.3.4.2/sc/src/sc.c:23:
> In file included from ../../p4est-0.3.4.2/sc/src/sc.h:77:
> ../../p4est-0.3.4.2/sc/src/sc_c99_functions.h:33:21: error: expected ')'
> /usr/include/stdio.h:494:20: note: expanded from macro 'fileno'
> #define fileno(p)       (!__isthreaded ? __sfileno(p) : (fileno)(p))
>                                ^
> ../../p4est-0.3.4.2/sc/src/sc_c99_functions.h:33:21: note: to match this '('
> /usr/include/stdio.h:494:19: note: expanded from macro 'fileno'
> #define fileno(p)       (!__isthreaded ? __sfileno(p) : (fileno)(p))
>                                ^
> 2 errors generated.
> *** Error code 1
> 
> 
>  I used the following configure:
> 
> ../p4est-0.3.4.2/configure --enable-mpi --enable-shared --disable-vtk
> --without-blas --prefix=/home/bruno/Documents
> /software/p4est
> 
> 
>  mpicc --version:
> 
> FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
> Target: x86_64-unknown-freebsd10.0
> Thread model: posix
> 
> 
> Best,
> 
> Bruno

Re: [p4est] Error compiling p4est 0.3.4.2 on FreeBSD

From:
Bruno Turcksin
Date:
2014-08-27 @ 01:02
>
> It would probably be best to remove the file sc_c99_functions.h
> altogether.  The splint specifics are definitely outdated, and the rest
> should be replaced by including appropriate header files.
>
> I commented everything in sc_c99_functions.h and it worked.

Thanks

Bruno

Re: [p4est] Error compiling p4est 0.3.4.2 on FreeBSD

From:
Carsten Burstedde
Date:
2014-08-27 @ 10:39
On Tue, Aug 26, 2014 at 08:02:27PM -0500, Bruno Turcksin wrote:
> >
> > It would probably be best to remove the file sc_c99_functions.h
> > altogether.  The splint specifics are definitely outdated, and the rest
> > should be replaced by including appropriate header files.
> >
> > I commented everything in sc_c99_functions.h and it worked.
> 
> Thanks
> 
> Bruno

The file is removed in the latest develop branch on github.  Feel free
to try it out.

Carsten

Re: [p4est] Error compiling p4est 0.3.4.2 on FreeBSD

From:
Tobin Isaac
Date:
2014-08-27 @ 11:06
Fair enough.  Without the file, I was able to generate some warnings when 
compiling p4est with strict compliance flags, but no errors.

  Toby

On August 27, 2014 5:39:25 AM CDT, Carsten Burstedde 
<burstedde@ins.uni-bonn.de> wrote:
>On Tue, Aug 26, 2014 at 08:02:27PM -0500, Bruno Turcksin wrote:
>> >
>> > It would probably be best to remove the file sc_c99_functions.h
>> > altogether.  The splint specifics are definitely outdated, and the
>rest
>> > should be replaced by including appropriate header files.
>> >
>> > I commented everything in sc_c99_functions.h and it worked.
>> 
>> Thanks
>> 
>> Bruno
>
>The file is removed in the latest develop branch on github.  Feel free
>to try it out.
>
>Carsten

Re: [p4est] Error compiling p4est 0.3.4.2 on FreeBSD

From:
Carsten Burstedde
Date:
2014-08-27 @ 11:39
Hi Toby,

On Wed, Aug 27, 2014 at 06:06:30AM -0500, Tobin Isaac wrote:
> Fair enough.  Without the file, I was able to generate some warnings 
when compiling p4est with strict compliance flags, but no errors.

if you are willing to maintain this logic, I'd be happy if you go for it.

Carsten

>   Toby
> 
> On August 27, 2014 5:39:25 AM CDT, Carsten Burstedde 
<burstedde@ins.uni-bonn.de> wrote:
> >On Tue, Aug 26, 2014 at 08:02:27PM -0500, Bruno Turcksin wrote:
> >> >
> >> > It would probably be best to remove the file sc_c99_functions.h
> >> > altogether.  The splint specifics are definitely outdated, and the
> >rest
> >> > should be replaced by including appropriate header files.
> >> >
> >> > I commented everything in sc_c99_functions.h and it worked.
> >> 
> >> Thanks
> >> 
> >> Bruno
> >
> >The file is removed in the latest develop branch on github.  Feel free
> >to try it out.
> >
> >Carsten

Re: [p4est] Error compiling p4est 0.3.4.2 on FreeBSD

From:
Tobin Isaac
Date:
2014-08-26 @ 21:32
On Tue, Aug 26, 2014 at 07:47:29PM +0200, Carsten Burstedde wrote:
> >  I'm trying to install p4est but it does not compile. I get the following
> > error:
> 
> It would probably be best to remove the file sc_c99_functions.h
> altogether.  The splint specifics are definitely outdated, and the rest
> should be replaced by including appropriate header files.

Shouldn't we put the appropriate feature test macros at the top of
sc.h?

  Toby

> Would you want to give it a shot and figure out the minimal set of
> system headers that's required to compile libsc and p4est on bsd?
> 
> Best,
> 
> Carsten
> 
> > In file included from ../../p4est-0.3.4.2/sc/src/sc.
> > c:23:
> > In file included from ../../p4est-0.3.4.2/sc/src/sc.h:77:
> > ../../p4est-0.3.4.2/sc/src/sc_c99_functions.h:33:21: error: expected
> > identifier or '('
> > int                 fileno (FILE * stream);
> >                     ^
> > /usr/include/stdio.h:494:20: note: expanded from macro 'fileno'
> > #define fileno(p)       (!__isthreaded ? __sfileno(p) : (fileno)(p))
> >                               ^
> > In file included from ../../p4est-0.3.4.2/sc/src/sc.c:23:
> > In file included from ../../p4est-0.3.4.2/sc/src/sc.h:77:
> > ../../p4est-0.3.4.2/sc/src/sc_c99_functions.h:33:21: error: expected ')'
> > /usr/include/stdio.h:494:20: note: expanded from macro 'fileno'
> > #define fileno(p)       (!__isthreaded ? __sfileno(p) : (fileno)(p))
> >                                ^
> > ../../p4est-0.3.4.2/sc/src/sc_c99_functions.h:33:21: note: to match this '('
> > /usr/include/stdio.h:494:19: note: expanded from macro 'fileno'
> > #define fileno(p)       (!__isthreaded ? __sfileno(p) : (fileno)(p))
> >                                ^
> > 2 errors generated.
> > *** Error code 1
> > 
> > 
> >  I used the following configure:
> > 
> > ../p4est-0.3.4.2/configure --enable-mpi --enable-shared --disable-vtk
> > --without-blas --prefix=/home/bruno/Documents
> > /software/p4est
> > 
> > 
> >  mpicc --version:
> > 
> > FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
> > Target: x86_64-unknown-freebsd10.0
> > Thread model: posix
> > 
> > 
> > Best,
> > 
> > Bruno

Re: [p4est] Error compiling p4est 0.3.4.2 on FreeBSD

From:
Carsten Burstedde
Date:
2014-08-27 @ 10:38
> On Tue, Aug 26, 2014 at 07:47:29PM +0200, Carsten Burstedde wrote:
> > >  I'm trying to install p4est but it does not compile. I get the following
> > > error:
> > 
> > It would probably be best to remove the file sc_c99_functions.h
> > altogether.  The splint specifics are definitely outdated, and the rest
> > should be replaced by including appropriate header files.
> 
> Shouldn't we put the appropriate feature test macros at the top of
> sc.h?
>
>   Toby

I've just removed the file.  So far my build does not complain.
Wrt. feature checks I'd like to keep it simple and let it be until
someone really requires them and proposes an update.

Carsten