bekcpear / riscv-chroot-env

mirror of https://gitlab.com/cwittlut/riscv-chroot-env
4 stars 1 forks source link

dev-util/colm compile failed #2

Open peeweep opened 1 year ago

peeweep commented 1 year ago

short log:

riscv64-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I.  -I../src/aapl  -Iinclude  -Wall -DPREFIX='"/usr"' -O2 -pipe -c -o libprog_a-fsmexec.o `test -f 'fsmexec.cc' || echo './'`fsmexec.cc
riscv64-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I.  -I../src/aapl  -Iinclude  -Wall -DPREFIX='"/usr"' -O2 -pipe -c -o libprog_a-redbuild.o `test -f 'redbuild.cc' || echo './'`redbuild.cc
riscv64-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I.  -I../src/aapl  -Iinclude  -Wall -DPREFIX='"/usr"' -O2 -pipe -c -o libprog_a-closure.o `test -f 'closure.cc' || echo './'`closure.cc
sedsubst: generating colm-wrap from colm-wrap.sh
/bin/chmod: colm-wrap: new permissions are r-xrwxrwx, not r-xr-xr-x
make[3]: *** [Makefile:2088: colm-wrap] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from compiler.h:42,
                 from synthesis.cc:26:
In member function ‘void CodeVect::setHalf(long int, half_t)’,
    inlined from ‘UniqueType* LangVarRef::evaluateCall(Compiler*, CodeVect&, CallArgVect*)’ at synthesis.cc:1190:15:
parsetree.h:107:22: warning: ‘asLoc’ may be used uninitialized [-Wmaybe-uninitialized]
  107 |                 data[pos] = half & 0xff;
      |                      ^~~
synthesis.cc: In member function ‘UniqueType* LangVarRef::evaluateCall(Compiler*, CodeVect&, CallArgVect*)’:
synthesis.cc:1169:13: note: ‘asLoc’ was declared here
 1169 |         int asLoc;
      |             ^~~~~
make[3]: Leaving directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src'
make[2]: *** [Makefile:1628: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src'
make[1]: *** [Makefile:671: all] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src'
make: *** [Makefile:486: all-recursive] Error 1
 * ERROR: dev-util/colm-0.14.7-r2::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-util/colm-0.14.7-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-util/colm-0.14.7-r2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-util/colm-0.14.7-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-util/colm-0.14.7-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7'
 * S: '/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7'

full log: https://fars.ee/a6JP

Looks like the /bin/chmod: colm-wrap: new permissions are r-xrwxrwx, not r-xr-xr-x cause error.

Could it be due to the setfacl rwx in chroot.sh? I tried use

sudo rm -rf ./rootfs/default/var/tmp/portage
sudo setfacl -b -R ./rootfs/default/var/tmp/

to remove it, compile passed.

bekcpear commented 1 year ago

https://github.com/bekcpear/riscv-chroot-env/blob/a3a2dd9016aa657caab1f06af3cecea14ccbd91e/chroot.sh#L27

The reason to use setfacl is to facilitate debugging from the outside of the chroot env (for non-root user).

The default ACL should effect only when the file is creating, so the chmod can successfully change the permission usually.

I don't know why chmod -w,+x cannot: https://github.com/adrian-thurston/colm/blob/d00ef7930a9d42469c19a5880744a086065ee20c/src/Makefile.am#L210

I have tried chmod a-w,a+x and chmod 555, they all successful.