rakudo / star

Rakudo Star (Raku distribution)
https://rakudo.org/
Artistic License 2.0
265 stars 41 forks source link

compilation (2020.05) fails on openbsd (6.7 current) #158

Closed rwp0 closed 1 year ago

rwp0 commented 4 years ago

hello,

i have read the instructions installing the devel/p5-ExtUtils-Config dependency as instructed for the platform i'm building on:

doas pkg_add git p5-ExtUtils-Config

installing 2020.05, after fetching the rakudo-star tarball and extracting it, with rstar install on openbsd-current (6.7) (as indicated in the quickstart section):

[2020-08-04T07:54:27] [INFO]  Installing Raku in /home/<user>/build/rakudo-star-2020.05
[2020-08-04T07:54:27] [INFO]  Starting build on MoarVM
[2020-08-04T07:54:27] [NOTIC] Using /home/<user>/build/rakudo-star-2020.05/tmp/tmp.6rDqfA10dC as working directory

Welcome to MoarVM!

Configuring native build environment ...................
    trying to compile a simple C program ............... YES
    Testing pkgconfig .................................. 0.29.1
Adding extra include for libzstd: -I/usr/local/include
Adding extra libs for libzstd: -L/usr/local/lib
OK

    probing whether your compiler thinks that it is gcc  YES
    probing how your compiler does static inline ....... static __inline__
    your CPU can read unaligned values for all of int32 int64 num64
    probing the size of pointers ....................... 8
    probing C type support for: _Bool, bool ............ YES: _Bool,bool
    probing computed goto support ...................... YES
    probing pthread_yield support ...................... NO
    probing existance of optional malloc_trim() ........ NO
    probing support of rdtscp intrinsic ................ YES

        make: make # <--- (!): gmake?

     compile: clang -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-ret-protector -O3 -DNDEBUG -Wno-logical-op-parentheses -D_REENTRANT -D_FILE_OFFSET_BITS=64 -fPIC  -DMVM_HEAPSNAPSHOT_FORMAT=3

    includes:  -I/usr/local/include  -I3rdparty/libuv/include -I3rdparty/libuv/src -I3rdparty/libatomicops/src -I3rdparty/libtommath -I3rdparty/dyncall/dynload -I3rdparty/dyncall/dyncall -I3rdparty/dyncall/dyncallback

        link: clang  -O3 -DNDEBUG -Wl,-rpath,"/@libdir@"

        libs:  -L/usr/local/lib -lm -lpthread -lkvm -lzstd

  byte order: little endian

Configuring 3rdparty libs .............................. OK

  3rdparty: 3rdparty/cmp/libcmp.a
            3rdparty/dyncall/dyncall/libdyncall_s.a
            3rdparty/dyncall/dyncallback/libdyncallback_s.a
            3rdparty/dyncall/dynload/libdynload_s.a
            3rdparty/libatomicops/src/libatomic_ops.a
            3rdparty/libtommath/libtommath.a
            3rdparty/libuv/libuv.a
            3rdparty/sha1/libsha1.a
            3rdparty/tinymt/libtinymt.a

Generating src/gen/config.c ............................ OK
Generating src/gen/config.h ............................ OK
Generating Makefile .................................... OK
Generating tools/check.mk .............................. OK
Generating build/mk-moar-pc.pl ......................... OK

Configuration SUCCESS.

Type 'make' to build and 'make help' to see a list of
available make targets.

...

[2020-08-04T07:56:30] [NOTIC] Using /home/<user>/build/rakudo-star-2020.05/tmp/tmp.1hliRDPNFg as working directory

fatal: not in a git directory
fatal: not in a git directory

Found /home/<user>/build/rakudo-star-2020.05/bin/moar version 2020.05, which is new enough.

Cleaning up ...

You can now use '/usr/local/bin/gmake' to build NQP.

After that, '/usr/local/bin/gmake test' will run some tests and

'/usr/local/bin/gmake install' will install NQP.

*** Parse error in /home/regular/build/rakudo-star-2020.05/tmp/tmp.1hliRDPNFg: Missing dependency operator (Makefile:27)

*** Parse error: Need an operator in 'endif' (Makefile:29)

*** Parse error: Need an operator in 'ASTOPS_MOAR' (Makefile:317)

*** Parse error: Need an operator in 'else' (Makefile:319)

*** Parse error: Need an operator in 'endif' (Makefile:321)

*** Parse error: Need an operator in 'ASTOPS_MOAR' (Makefile:433)

*** Parse error: Need an operator in 'else' (Makefile:435)

*** Parse error: Need an operator in 'endif' (Makefile:437)

[2020-08-04T07:56:31] [ALERT] Build failed!

i believe it might be due to the make: make line not pointing to /usr/local/bin/gmake (port: devel/gmake) as can be seen from the compilation output.

if true, how do i modify the environment pointing at correct utilities (by their path) for compilation using the rstar utility?

ps. i have also noticed that rakudo, nqp, and moarvm are aleardy ported on openbsd, but as of now they are a bit older (2018.12), hence probably built directly with Configure.pl without using rstar.

andinus commented 3 years ago

https://github.com/rakudo/star/commit/54a1cb01d3cfd3c6df042a514e03dbfa939a6c5d should fix this issue.

rwp0 commented 3 years ago

54a1cb0 should fix this issue.

awesome, i can now confirm building successfully by cloning the repository (on -current)