CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

bison and m4 not getting built for swak4Foam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 20, 2021, 02:24
Default bison and m4 not getting built for swak4Foam
  #1
New Member
 
Supratim
Join Date: May 2021
Posts: 1
Rep Power: 0
haldersupratim4 is on a distinguished road
I have tried to build the correct versions of dependencies m4 and bison for installing swak4Foam but for some reason both of these show errors while executing the make command. I am using OpenFOAM version 2012 in Ubuntu 20.04. And I have m4 version 1.4.18 already installed in the system but the one required to be built is 1.4.17. And the version of bison required is 2.7.


The error encountered after the make command of m4:
gcc -I. -g -O2 -MT freadahead.o -MD -MP -MF $depbase.Tpo -c -o freadahead.o freadahead.c &&\
mv -f $depbase.Tpo $depbase.Po
freadahead.c: In function 'freadahead':
freadahead.c:91:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
91 | #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
| ^~~~~
make[3]: *** [Makefile:1837: freadahead.o] Error 1
make[3]: Leaving directory '/home/supratim/OpenFOAM/supratim-v2012/swak4Foam/m4-1.4.17/lib'
make[2]: *** [Makefile:1602: all] Error 2
make[2]: Leaving directory '/home/supratim/OpenFOAM/supratim-v2012/swak4Foam/m4-1.4.17/lib'
make[1]: *** [Makefile:1506: all-recursive] Error 1
make[1]: Leaving directory '/home/supratim/OpenFOAM/supratim-v2012/swak4Foam/m4-1.4.17'
make: *** [Makefile:1461: all] Error 2





The error encountered after make command for bison:
fseterr.c: In function 'fseterr':
fseterr.c:77:3: error: #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
77 | #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
| ^~~~~
make[3]: *** [Makefile:1895: fseterr.o] Error 1
make[3]: Leaving directory '/home/supratim/OpenFOAM/supratim-v2012/swak4Foam/bison-2.7/lib'
make[2]: *** [Makefile:1651: all] Error 2
make[2]: Leaving directory '/home/supratim/OpenFOAM/supratim-v2012/swak4Foam/bison-2.7/lib'
make[1]: *** [Makefile:1532: all-recursive] Error 1
make[1]: Leaving directory '/home/supratim/OpenFOAM/supratim-v2012/swak4Foam/bison-2.7'
make: *** [Makefile:1462: all] Error 2


Can somebody please help me out regarding this?

Thanks and regards
haldersupratim4 is offline   Reply With Quote

Old   May 16, 2022, 13:22
Default
  #2
Member
 
Mohammad Reza
Join Date: Sep 2015
Posts: 44
Rep Power: 11
Bana is on a distinguished road
Hello,

I am facing the same problem, have you found any solution?
Bana is offline   Reply With Quote

Old   August 10, 2023, 05:39
Default
  #3
New Member
 
p.t
Join Date: Jun 2020
Posts: 2
Rep Power: 0
pingtao is on a distinguished road
Quote:
Originally Posted by haldersupratim4 View Post
The error encountered after make command for bison:
fseterr.c: In function 'fseterr':
fseterr.c:77:3: error: #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
77 | #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
| ^~~~~
make[3]: *** [Makefile:1895: fseterr.o] Error 1
make[3]: Leaving directory '/home/supratim/OpenFOAM/supratim-v2012/swak4Foam/bison-2.7/lib'
make[2]: *** [Makefile:1651: all] Error 2
make[2]: Leaving directory '/home/supratim/OpenFOAM/supratim-v2012/swak4Foam/bison-2.7/lib'
make[1]: *** [Makefile:1532: all-recursive] Error 1
make[1]: Leaving directory '/home/supratim/OpenFOAM/supratim-v2012/swak4Foam/bison-2.7'
make: *** [Makefile:1462: all] Error 2

I found a solution in https://code.videolan.org/videolan/vlc/-/issues/28048, according to which I modified the fseterr.c L32 to
Code:
#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1
and it works for me.


Hope it helps.
pingtao is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 16:23.