TritonDataCenter / smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: https://smartos.topicbox.com/groups/smartos-discuss
1.56k stars 244 forks source link

Build Error #1101

Closed discostur closed 1 month ago

discostur commented 1 month ago

Hi,

i just tried to build SmartOS from source. Everything is setup and im building inside a base-64-lts 21.4.1 zone running on SmartOS 5.11 joyent_20220313T010148Z. During the gmake world i get:

smartosbuild.intern.internetx.de --> Job output
/root/smartosbuild/smartos-live/projects/illumos/usr/src/tools/sgs
/root/smartosbuild/smartos-live/projects/illumos/usr/src/tools/sgs/include
/root/smartosbuild/smartos-live/projects/illumos/usr/src/tools/sgs/sgsmsg
/root/smartosbuild/smartos-live/projects/illumos/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/cw  --primary gcc10,/root/smartosbuild/smartos-live/proto.strap/usr/gcc/10/bin/gcc,gnu  --shadow smatch,/root/smartosbuild/smartos-live/projects/illumos/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/smatch,smatch -- -DDEBUG -O -_gcc=-fno-inline-small-functions  -_gcc=-fno-inline-functions-called-once -m32  -errtags=yes -errwarn=%all -_gcc=-Wno-missing-braces -_gcc=-Wno-sign-compare -_gcc=-Wno-unknown-pragmas -_gcc=-Wno-unused-parameter -_gcc=-Wno-missing-field-initializers -_gcc=-Wno-array-bounds -_smatch=-p=illumos_user -_smatch=--disable=uninitialized,check_check_deref -_smatch=-Wno-vla -_smatch=-Wno-one-bit-signed-bitfield -_smatch=-Wno-external-function-has-definition -_smatch=-Wno-old-style-definition -_smatch=-Wno-strict-prototypes -_smatch=--fatal-checks -_smatch=--timeout=0  -_smatch=off -xc99=%all -_gcc=-fno-inline-small-functions  -_gcc=-fno-inline-functions-called-once  -_gcc=-fno-ipa-cp  -_gcc=-fno-ipa-icf  -_gcc=-fno-clone-functions  -_gcc=-fno-reorder-functions  -_gcc=-fno-reorder-blocks-and-partition -_gcc=-fno-aggressive-loop-optimizations -_gcc=--param=max-inline-insns-single=450    -I. -I -I/common  -I/root/smartosbuild/smartos-live/projects/illumos/usr/src/cmd/sgs/include -I/root/smartosbuild/smartos-live/projects/illumos/usr/src/cmd/sgs/include/i386  -I../include -I/opt/local/include -I/root/smartosbuild/smartos-live/projects/illumos/usr/src/common/elfcap -DNATIVE_BUILD -c /root/smartosbuild/smartos-live/projects/illumos/usr/src/cmd/sgs/common/string_table.c
+ /root/smartosbuild/smartos-live/proto.strap/usr/gcc/10/bin/gcc -fident -finline -fno-inline-functions -fno-builtin -fno-asm -fdiagnostics-show-option -nodefaultlibs -D__sun -DDEBUG -O -fno-inline-small-functions -fno-inline-functions-called-once -m32 -Wall -Wextra -Werror -Wno-missing-braces -Wno-sign-compare -Wno-unknown-pragmas -Wno-unused-parameter -Wno-missing-field-initializers -Wno-array-bounds -std=gnu99 -fno-inline-small-functions -fno-inline-functions-called-once -fno-ipa-cp -fno-ipa-icf -fno-clone-functions -fno-reorder-functions -fno-reorder-blocks-and-partition -fno-aggressive-loop-optimizations --param=max-inline-insns-single=450 -I. -I -I/common -I/root/smartosbuild/smartos-live/projects/illumos/usr/src/cmd/sgs/include -I/root/smartosbuild/smartos-live/projects/illumos/usr/src/cmd/sgs/include/i386 -I../include -I/opt/local/include -I/root/smartosbuild/smartos-live/projects/illumos/usr/src/common/elfcap -DNATIVE_BUILD -c /root/smartosbuild/smartos-live/projects/illumos/usr/src/cmd/sgs/common/string_table.c 
/root/smartosbuild/smartos-live/projects/illumos/usr/src/cmd/sgs/common/string_table.c: In function 'st_setallstrings':
/root/smartosbuild/smartos-live/projects/illumos/usr/src/cmd/sgs/common/string_table.c:730:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__maybe_unused'
  730 |   int res __maybe_unused;
      |           ^~~~~~~~~~~~~~
/root/smartosbuild/smartos-live/projects/illumos/usr/src/cmd/sgs/common/string_table.c:730:11: error: '__maybe_unused' undeclared (first use in this function)
/root/smartosbuild/smartos-live/projects/illumos/usr/src/cmd/sgs/common/string_table.c:730:11: note: each undeclared identifier is reported only once for each function it appears in
/root/smartosbuild/smartos-live/projects/illumos/usr/src/cmd/sgs/common/string_table.c:732:3: error: 'res' undeclared (first use in this function)
  732 |   res = st_setstring(stp, str->sm_str, NULL);
      |   ^~~
*** Error code 1
make: Warning: Target `install' not remade because of errors
Current working directory /root/smartosbuild/smartos-live/projects/illumos/usr/src/tools/sgs/sgsmsg
*** Error code 1
The following command caused the error:
cd sgsmsg; pwd; /opt/local/bin/dmake install
make: Warning: Target `install' not remade because of errors
Current working directory /root/smartosbuild/smartos-live/projects/illumos/usr/src/tools/sgs
*** Error code 1
The following command caused the error:
cd sgs; pwd; /opt/local/bin/dmake install
make: Warning: Command failed for target `sgs'

Any idea whats wrong?

Thanks, Regards Kilian

danmcd commented 1 month ago

Ahhh. Your PI is very behind (20220313). I'll have to check the flag days, but I'm pretty sure you need at least this:

https://smartos.topicbox.com/groups/smartos-discuss/T6c39bc9cb7b65bfc

And maybe some other things. I'd highly recommend a PI upgrade.

discostur commented 1 month ago

@danmcd thanks for your help, i updated the PI to joyent_20240502T000615Z and it is building now ;) Maybe you update the readme because it says you need at least 20211007...

Thanks ;)