ARM-software / arm-enterprise-acs

ARM Enterprise ACS
Apache License 2.0
42 stars 52 forks source link

fix bison build with new libc #73

Closed leiflindholm closed 3 years ago

leiflindholm commented 4 years ago

Same cause as the m4 issue, build fails with:

| ../bison-3.0.4/lib/fseterr.c: In function 'fseterr':
| ../bison-3.0.4/lib/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."
|   #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."
|    ^~~~~

A seemingly functional fix can be found at https://github.com/rdslw/openwrt/blob/e5d47f32131849a69a9267de51a30d6be1f0d0ac/tools/bison/patches/110-glibc-change-work-around.patch

edhay commented 4 years ago

Solution verification is in progress. The fix will be incorporated in the upcoming Enterprise ACS v3.0

bcran commented 3 years ago

I've tested this on Ubuntu 20.04 and the build now succeeds.

edhay commented 3 years ago

Closing this issue as per confirmation from @bcran.

shravan56 commented 3 years ago

I've tested this on Ubuntu 20.04 and the build now succeeds.

Can u please explain how u applied this patch after download? (patch: https://github.com/rdslw/openwrt/blob/e5d47f32131849a69a9267de51a30d6be1f0d0ac/tools/bison/patches/110-glibc-change-work-around.patch)

bcran commented 3 years ago

I'm not sure I did. I just ran the build and it worked.

shravan56 commented 3 years ago

Same cause as the m4 issue, build fails with:

| ../bison-3.0.4/lib/fseterr.c: In function 'fseterr':
| ../bison-3.0.4/lib/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."
|   #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."
|    ^~~~~

A seemingly functional fix can be found at https://github.com/rdslw/openwrt/blob/e5d47f32131849a69a9267de51a30d6be1f0d0ac/tools/bison/patches/110-glibc-change-work-around.patch

Can u please explain how u applied this patch after download?

XiaowenHu96 commented 2 years ago

@shravan56 I applied the patch under bison-3.0.4/lib

divinity76 commented 1 year ago

@shravan56 basically

wget 'http://ftp.gnu.org/gnu/bison/bison-2.7.tar.xz'
tar xfv bison-2.7.tar.xz
cd bison-2.7
wget 'https://raw.githubusercontent.com/rdslw/openwrt/e5d47f32131849a69a9267de51a30d6be1f0d0ac/tools/bison/patches/110-glibc-change-work-around.patch' -O- \
 | git apply -
mkdir -pv [bison_bin_dir]
./configure --prefix=[bison_bin_dir]
make -j $(nproc)
make install