keystone-enclave / keystone

Keystone Enclave (QEMU + HiFive Unleashed)
Other
462 stars 133 forks source link

tar value <uid> out of uid_t range 0..2097151 #438

Open harpreetsc1992 opened 6 months ago

harpreetsc1992 commented 6 months ago

Hello, I am trying to build keystone and am building this version of the tool - a1842a1ec959c4e40ffd55091795bb577894c545 - on an x86 machine, so that I can run it with gem5. I'm building on the 5.15.0-100-generic kernel, and it is an Ubuntu distribution. The machine is a Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz model.

The steps that I have performed up until now are: git clone https://github.com/keystone-enclave/keystone.git cd keystone git checkout a1842a1ec959c4e40ffd55091795bb577894c545 ./fast-setup.sh source source.sh mkdir build cd build cmake .. make

On doing make, I get the following error: [ 34%] Generating pkg/eyrie-rt cd /home/grads/h/harpreetsc/Downloads/keystone/build/examples/tests && cp eyrie-rt /home/grads/h/harpreetsc/Downloads/keystone/build/examples/tests/pkg/eyrie-rt cd /home/grads/h/harpreetsc/Downloads/keystone/build/examples/tests && /usr/bin/makeself --noprogress /home/grads/h/harpreetsc/Downloads/keystone/build/examples/tests/pkg tests.ke "Keystone Enclave Package" ./run-test.sh Header is 714 lines long

About to compress 1520 KB of data... Adding files to archive named "tests.ke"... _tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uid_t range 0..2097151 tar: value ######### out of uidt range 0..2097151 tar: Exiting with failure status due to previous errors ERROR: failed to create temporary archive: /tmp/mkself8151.tar make[2]: [examples/tests/CMakeFiles/test-package.dir/build.make:85: examples/tests/CMakeFiles/test-package] Error 1 make[2]: Leaving directory '/home/grads/h/harpreetsc/Downloads/keystone/build' make[1]: [CMakeFiles/Makefile2:1163: examples/tests/CMakeFiles/test-package.dir/all] Error 2 make[1]: Leaving directory '/home/grads/h/harpreetsc/Downloads/keystone/build' make: *** [Makefile:94: all] Error 2

The ######### is a uid assigned to me by my university, a 9 digit number, which also happens to be my UIN (that is why I have hidden it).

My tar version is GNU tar 1.34.

Why is tar blocking on a big number in the script? And how can I mitigate this error? Any help would be useful.

Thanks

harpreetsc1992 commented 6 months ago

I did find a solution that is working for me. In sdk/macros.cmake, the makeself command can be changed to: COMMAND ${MAKESELF} --tar-extra "--owner=0 --group=0" --noprogress ${pkg_dir} ${package_name} \"Keystone Enclave Package\" ${package_script_raw}

I believe this will even be applicable to the latest branch too.