Opened 3 years ago
Last modified 10 months ago
#64913 accepted defect
vlang fails for PowerPC: -latomic flag needed, Header file <sys/errno.h>, needed for module `sync` was not found
Reported by: | barracuda156 | Owned by: | harens (Haren S) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | powerpc, leopard, snowleopard | Cc: | |
Port: | vlang |
Description
To begin with, -latomic
must be added for darwin powerpc
, otherwise build fails with:
Undefined symbols: "___atomic_fetch_add_8", referenced from: _sync__stdatomic__add_u64 in ccASGYHE.o _sync__stdatomic__add_i64 in ccASGYHE.o "___atomic_load_8", referenced from: _sync__stdatomic__load_u64 in ccASGYHE.o _sync__stdatomic__load_i64 in ccASGYHE.o _sync__ManyTimes_do in ccASGYHE.o _sync__Once_do in ccASGYHE.o _sync__Once_do_with_param in ccASGYHE.o "___atomic_fetch_sub_8", referenced from: _sync__stdatomic__sub_u64 in ccASGYHE.o _sync__stdatomic__sub_i64 in ccASGYHE.o "___atomic_store_8", referenced from: _sync__stdatomic__store_u64 in ccASGYHE.o _sync__stdatomic__store_i64 in ccASGYHE.o _sync__ManyTimes_do_slow in ccASGYHE.o _sync__Once_do_slow in ccASGYHE.o _sync__Once_do_slow_with_param in ccASGYHE.o ld: symbol(s) not found
After adding the flag, on 10.5.8 build fails with:
builder error: Header file <sys/errno.h>, needed for module `sync` was not found. Please install the corresponding development headers. Command failed: ./v1 -no-parallel -o v2 -cc /opt/local/bin/gcc-mp-7 -cflags -Os cmd/v Exit code: 1
Attachments (13)
Change History (70)
Changed 3 years ago by barracuda156
comment:1 follow-up: 2 Changed 3 years ago by harens (Haren S)
Status: | assigned → accepted |
---|
comment:2 Changed 3 years ago by barracuda156
Replying to harens:
Hi there! Thanks for opening this ticket and for your comments on the original commit.
To begin with, -latomic must be added for darwin powerpc
Good to know. I'll make this change.
Thank you. If you don't mind, condition it on build.arch
being ppc ppc64
- that won't prevent building on 10.6 PPC and 10.6.8 Rosetta (conditioning on os.arch
will break it for Rosetta).
For your machine, I would've thought that the header file would be in
/usr/include/errno.h
.
How should I fix that? In build files? Headers should be standard, this is on 10.5.8 with Xcode 3.1.4, nothing weird.
comment:3 follow-ups: 4 6 Changed 3 years ago by harens (Haren S)
Thank you. If you don't mind, condition it on build.arch being ppc ppc64 - that won't prevent building on 10.6 PPC and 10.6.8 Rosetta (conditioning on os.arch will break it for Rosetta).
I'm happy to do that. Would you mind explaining a bit more why it breaks for Rosetta? Does it cause a build failure if the condition isn't applied here? Also, there are at least 4 different ports that apply -latomic
based on os.arch
. These might need to be changed.
How should I fix that? In build files? Headers should be standard, this is on 10.5.8 with Xcode 3.1.4, nothing weird.
I'm not sure yet, I agree it is odd that it can't find it. However, I don't think it's an issue with the port. Just to double check, does /usr/include/errno.h
exist?
Also, I was just re-reading through the logs, and I noticed you were running an older version of the port. The current version will still fail to build but I'd like to check if the errors are different. You might need to apply the latomic
patch since I haven't added it yet. Thanks for all your help.
comment:4 Changed 3 years ago by barracuda156
Replying to harens:
I'm happy to do that. Would you mind explaining a bit more why it breaks for Rosetta? Does it cause a build failure if the condition isn't applied here? Also, there are at least 4 different ports that apply
-latomic
based onos.arch
. These might need to be changed.
Thank you!
I meant it likely just won't be used because os.arch
will be x86_64, and then build gonna fail since ppc needs -latomic
. I will need to test that specifically to say for sure (now on PPC machine and away from Intel).
comment:5 Changed 3 years ago by Haren S <12570877+harens@…>
comment:6 Changed 3 years ago by barracuda156
Replying to harens:
I'm not sure yet, I agree it is odd that it can't find it. However, I don't think it's an issue with the port. Just to double check, does
/usr/include/errno.h
exist?
Yes, there is /usr/include/errno.h
which refers to /usr/include/sys/errno.h
, which is also in place.
comment:7 follow-ups: 8 9 Changed 3 years ago by harens (Haren S)
I've made a lot of changes to the vlang port recently. As a result, V finally builds on all the MacPorts buildbots. (yay!)
I'm hoping that this should help with the /usr/include/errno.h
issue. Would you be happy to try the latest port (via sudo port selfupdate
)? We can then examine any errors that come up. As always, thank you for your help on this.
comment:8 Changed 3 years ago by barracuda156
Replying to harens:
I've made a lot of changes to the vlang port recently. As a result, V finally builds on all the MacPorts buildbots. (yay!)
I'm hoping that this should help with the
/usr/include/errno.h
issue. Would you be happy to try the latest port (viasudo port selfupdate
)? We can then examine any errors that come up. As always, thank you for your help on this.
Thank you. Just for the record, on 10.6 PPC it fails still with:
builder error: ================== C error. This should never happen. This is a compiler bug, please report it using `v bug file.v`. https://github.com/vlang/v/issues/new/choose You can also use #help on Discord: https://discord.gg/vlang make: *** [all] Error 1
I will try on 10.5.8 now.
comment:9 Changed 3 years ago by barracuda156
Replying to harens:
I've made a lot of changes to the vlang port recently. As a result, V finally builds on all the MacPorts buildbots. (yay!)
I'm hoping that this should help with the
/usr/include/errno.h
issue. Would you be happy to try the latest port (viasudo port selfupdate
)? We can then examine any errors that come up. As always, thank you for your help on this.
On 10.5.8 it fails differently, again complaining about the header:
0.000 ms C gcc-mp-7 builder error: Header file <sys/errno.h>, needed for module `sync` was not found. Please install the corresponding development headers. make: *** [all] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13'
It also ignores +universal
and builds only one arch.
Changed 3 years ago by barracuda156
Attachment: | main_10.5.8-ppc64.log added |
---|
comment:10 Changed 3 years ago by barracuda156
Attempt to build for ppc32 also fails on Leopard in the same way:
> C compiler response file "/private/tmp/v_502/v2.exe.14234125913187763928.tmp.c.rsp": -Os -arch ppc -Os -Os -std=c99 -D_DEFAULT_SOURCE -g -no-pie -O3 -fno-strict-aliasing -flto -o "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13/v2.exe" -I "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13/thirdparty/stdatomic/nix" -x objective-c "/private/tmp/v_502/v2.exe.14234125913187763928.tmp.c" -x none -mmacosx-version-min=10.5 -rdynamic -lpthread -Wl,-headerpad_max_install_names -latomic /opt/local/lib/libMacportsLegacySupport.a -arch ppc 0.000 ms C gcc-mp-7 builder error: Header file <sys/errno.h>, needed for module `sync` was not found. Please install the corresponding development headers. make: *** [all] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13" && /usr/bin/make -j4 -w all local=true VFLAGS="-v -cg -showcc -prod -cc /opt/local/bin/gcc-mp-7 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1 CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-7" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-7" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-7" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-7" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-7" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-7" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-7" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build vlang: command execution failed
comment:11 follow-up: 12 Changed 3 years ago by harens (Haren S)
Thank you. Just for the record, on 10.6 PPC it fails still with:
If this is different to the sys/errno.h
error, would you mind sending the logs? Thanks.
It also ignores +universal and builds only one arch.
Thank you for letting me know. This might be quite difficult to fix, since vlang has an unusual build setup, but I'll see what I can do. Worst case scenario, I might disable the universal variant, but hopefully it won't come to that.
Attempt to build for ppc32 also fails on Leopard in the same way
I still don't understand why it can't find the header automatically. However, we can try manually including it and see if that works.
Would you mind adding -cflags -I${configure.sdkroot}/usr/include
to the end of VFLAGS
in the portfile. i.e.
VFLAGS="-v -cg -showcc -prod -cc ${configure.cc} -cflags [shellescape ${configure.cflags}] -cflags -I${configure.sdkroot}/usr/include" \
I'm not entirely sure what ${configure.sdkroot}
is on your machine, so if that doesn't work, try -cflags -I/usr/include
. Lets see if that changes anything.
comment:12 Changed 3 years ago by barracuda156
Replying to harens:
Thank you. Just for the record, on 10.6 PPC it fails still with:
If this is different to the
sys/errno.h
error, would you mind sending the logs? Thanks.
Sure, I will attach a log now.
To be clear, 10.6 PPC is a developer build of 10.6, so it is not normally supported on Macports and elsewhere. I was requested not to file tickets specific to 10.6 PPC. So while I will be grateful to anyone who cares to fix a port for 10.6 PPC as well, this is in no way a standard expectation. Generally speaking, once a port builds for ppc32 on Leopard, there will be a way to get it onto 10.6 PPC. And considering interests of other developers and users, fixing anything PowerPC for 10.5.8 is always prioritized over alternatives.
Changed 3 years ago by barracuda156
Attachment: | main_10A190.log added |
---|
A failure on 10.6 PPC, just for the record
comment:13 follow-up: 14 Changed 3 years ago by harens (Haren S)
Thanks for the logs. The key error seems to be this:
/opt/local/lib/gcc11/gcc/ppc-apple-darwin10/11.2.0/include/stdatomic.h:40:1: sorry, unimplemented: '_Atomic' in Objective-C 1766 :info:build 40 | typedef _Atomic _Bool atomic_bool;
I'll do some digging. In the meantime, before you try the VFLAGS
fix above for ppc32 Leopard, would you mind sharing the output of /opt/local/bin/gcc-mp-7 -v
. Thanks.
comment:14 Changed 3 years ago by barracuda156
Replying to harens:
I'll do some digging. In the meantime, before you try the
VFLAGS
fix above for ppc32 Leopard, would you mind sharing the output of/opt/local/bin/gcc-mp-7 -v
. Thanks.
Thank you!
36-109:~ svacchanda$ /opt/local/bin/gcc-mp-7 -v Using built-in specs. COLLECT_GCC=/opt/local/bin/gcc-mp-7 COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/ppc-apple-darwin9/7.5.0/lto-wrapper Target: ppc-apple-darwin9 Configured with: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc7/gcc7/work/gcc-7.5.0/configure --prefix=/opt/local --build=ppc-apple-darwin9 --enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc7 --includedir=/opt/local/include/gcc7 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-7 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-7 --with-gxx-include-dir=/opt/local/include/gcc7/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --enable-stage1-checking --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-tls --with-pkgversion='MacPorts gcc7 7.5.0_3+universal' Thread model: posix gcc version 7.5.0 (MacPorts gcc7 7.5.0_3+universal)
comment:15 follow-up: 16 Changed 3 years ago by harens (Haren S)
Thanks. One final thing, would you mind running this errno.h
example program? (based off here)
//demo.c #include <stdio.h> #include <sys/errno.h> int main() { // If a file is opened which does not exist, // then it will be an error and corresponding // errno value will be set FILE * fp; // opening a file which does // not exist. fp = fopen("GeeksForGeeks.txt", "r"); printf(" Value of errno: %d\n ", errno); return 0; }
> /opt/local/bin/gcc-mp-7 -o demo demo.c > ./demo
If everything works, you should get something like this:
Value of errno: 2 %
comment:16 follow-up: 19 Changed 3 years ago by barracuda156
Replying to harens:
Works correctly on 10.6 PPC:
36-109% /opt/local/bin/gcc-mp-10 -o demo /Users/svacchanda/Desktop/demo.c 36-109% /Users/svacchanda/Desktop/demo Value of errno: 2 %
And yes, I got the same on 10.5.8:
36-109:~ svacchanda$ /Users/svacchanda/demo Value of errno: 2
- S. I am in the process of moving to
gcc11
on 10.5.8, so in few days will be able to test with it.
comment:17 follow-up: 18 Changed 3 years ago by barracuda156
It also fails on 10.6.8 Rosetta:
builder.compile() pref: all .v files before: v.pref.lookup_path: ['/usr/libexec/oah/vlib', '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/.home/.vmodules'] builder error: `builtin/` not included on module lookup path. Did you forget to add vlib to the path? (Use @vlib for default vlib) make: *** [all] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13" && /usr/bin/make -j4 -w all local=true VFLAGS="-v -cg -showcc -prod -cc /opt/local/bin/gcc-mp-10 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1 CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-10" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-10" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-10" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-10" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-10" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-10" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-10" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build vlang: command execution failed
Changed 3 years ago by barracuda156
Attachment: | main_10.6.8.log added |
---|
comment:18 Changed 3 years ago by harens (Haren S)
Replying to barracuda156:
It also fails on 10.6.8 Rosetta:
builder.compile() pref: all .v files before: v.pref.lookup_path: ['/usr/libexec/oah/vlib', '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/.home/.vmodules'] builder error: `builtin/` not included on module lookup path. Did you forget to add vlib to the path? (Use @vlib for default vlib) make: *** [all] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13" && /usr/bin/make -j4 -w all local=true VFLAGS="-v -cg -showcc -prod -cc /opt/local/bin/gcc-mp-10 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1 CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-10" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-10" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-10" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-10" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-10" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-10" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-10" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build vlang: command execution failed
This is really weird. What is /usr/libexec/oah/vlib
and how did it end up there? Would you mind deleting/moving it and try running it again? If it still doesn't work, there might be workarounds we can use.
comment:19 follow-up: 20 Changed 3 years ago by harens (Haren S)
Replying to barracuda156:
Replying to harens:
Works correctly on 10.6 PPC:
36-109% /opt/local/bin/gcc-mp-10 -o demo /Users/svacchanda/Desktop/demo.c 36-109% /Users/svacchanda/Desktop/demo Value of errno: 2 %And yes, I got the same on 10.5.8:
36-109:~ svacchanda$ /Users/svacchanda/demo Value of errno: 2
- S. I am in the process of moving to
gcc11
on 10.5.8, so in few days will be able to test with it.
Thanks for running that. I wanted to check whether gcc could find sys/errno.h
, and it seems that it can. Ignore the VFLAGS
fix; I don't think that it will make a difference.
Until I find a better solution, would you mind removing the errno
reference in vlang? It's only required for a specific concurrency example, and so shouldn't make that much of a difference during runtime:
> sudo port fetch vlang > sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.13/vlib/sync/sync_darwin.c.v" > sudo port -o install vlang
Just to note that this is not a fix, it's just a temporary patch until I find something better. This problem is a bit tricky :)
comment:20 Changed 3 years ago by barracuda156
Replying to harens:
Thanks for running that. I wanted to check whether gcc could find
sys/errno.h
, and it seems that it can. Ignore theVFLAGS
fix; I don't think that it will make a difference.Until I find a better solution, would you mind removing the
errno
reference in vlang? It's only required for a specific concurrency example, and so shouldn't make that much of a difference during runtime:> sudo port fetch vlang > sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.13/vlib/sync/sync_darwin.c.v" > sudo port -o install vlangJust to note that this is not a fix, it's just a temporary patch until I find something better. This problem is a bit tricky :)
Thank you. I tried doing that (after sudo port extract vlang
), but is nevertheless failed on 10.5.8:
builder.cc() pref.out_name="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13/v2.exe" build_thirdparty_obj_files: v.ast.cflags: [CFlag{ name: "-I" value: "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13/thirdparty/stdatomic/nix" mod: "sync.stdatomic" os: "" cached: "" }, CFlag{ name: "-l" value: "pthread" mod: "sync.threads" os: "" cached: "" }, CFlag{ name: "-l" value: "shell32" mod: "v.builder" os: "windows" cached: "" }, CFlag{ name: "-l" value: "dbghelp" mod: "v.builder" os: "windows" cached: "" }, CFlag{ name: "-l" value: "advapi32" mod: "v.builder" os: "windows" cached: "" }] cc() isprod=true outname=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13/v2.exe > C compiler cmd: '/opt/local/bin/gcc-mp-6' '@/tmp/v_502/v2.exe.14234125913187763928.tmp.c.rsp' > C compiler response file "/tmp/v_502/v2.exe.14234125913187763928.tmp.c.rsp": -Os -arch ppc -Os -Os -std=c99 -D_DEFAULT_SOURCE -g -no-pie -O3 -fno-strict-aliasing -flto -o "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13/v2.exe" -I "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13/thirdparty/stdatomic/nix" -x objective-c "/tmp/v_502/v2.exe.14234125913187763928.tmp.c" -x none -mmacosx-version-min=10.5 -rdynamic -lpthread -Wl,-headerpad_max_install_names -latomic /opt/local/lib/libMacportsLegacySupport.a -arch ppc 0.000 ms C gcc-mp-6 gcc-mp-6: error: unrecognized command line option '-no-pie'; did you mean '-no-pie'? builder error: ================== C error. This should never happen. This is a compiler bug, please report it using `v bug file.v`. https://github.com/vlang/v/issues/new/choose You can also use #help on Discord: https://discord.gg/vlang make: *** [all] Error 1
- S. I use
gcc6
now because of compilers transition which I mentioned above.
Changed 3 years ago by barracuda156
Attachment: | main_10.5.8_gcc6_errno_removed.log added |
---|
comment:21 follow-up: 22 Changed 3 years ago by harens (Haren S)
Ok this should (hopefully) be an easy fix. From https://trac.macports.org/ticket/34064:
I got this from the ld(1) manpage on Leopard which includes '-no_pie' even though it looks like /usr/bin/ld doesn't actually support it (based on a quick check of "strings" output... sigh).
It seems like this flag is only added for backtraces to work on modern linux distros, so we should be able to patch this out. Would you mind running this block below? (n.b. it is different to the one above)
> sudo port extract vlang > sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.13/vlib/sync/sync_darwin.c.v" > sudo sed -i "" "252d" "$(port work vlang)/v-weekly.2022.13/vlib/v/builder/cc.v" > sudo port -o install vlang
Once we've tested whether all these fixes work, I'll write patches for the portfile to do all of this automatically. Thanks for your help.
comment:22 Changed 3 years ago by barracuda156
Replying to harens:
Once we've tested whether all these fixes work, I'll write patches for the portfile to do all of this automatically. Thanks for your help.
I ran the following:
36-109:~ svacchanda$ sudo port extract vlang Portfile changed since last build; discarding previous state. ---> Fetching distfiles for vlang ---> Verifying checksums for vlang ---> Extracting vlang 36-109:~ svacchanda$ sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.13/vlib/sync/sync_darwin.c.v" 36-109:~ svacchanda$ sudo sed -i "" "252d" "$(port work vlang)/v-weekly.2022.13/vlib/v/builder/cc.v" 36-109:~ svacchanda$ sudo port -v -n -o install vlang -universal configure.compiler=macports-gcc-6
And it failed again:
0.000 ms C gcc-mp-6 gcc-mp-6: error: unrecognized command line option '-no-pie'; did you mean '-no-pie'? builder error: ================== C error. This should never happen. This is a compiler bug, please report it using `v bug file.v`. https://github.com/vlang/v/issues/new/choose You can also use #help on Discord: https://discord.gg/vlang make: *** [all] Error 1
Changed 3 years ago by barracuda156
Attachment: | main_10.5.8_gcc6_v2.log added |
---|
Changed 3 years ago by barracuda156
Attachment: | main_10.6ppc_gcc10.log added |
---|
comment:23 Changed 3 years ago by harens (Haren S)
That's on me. I forgot that -no-pie
would also be in the V compiler.
> grep -rnw * -e '-no-pie' v-weekly.2022.13/vlib/v/builder/cc.v:252: debug_options = ['-g', '-no-pie'] vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v_win.c:89288: debug_options = new_array_from_c_array(2, 2, sizeof(string), _MOV((string[2]){_SLIT("-g"), _SLIT("-no-pie")})); vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c:91227: debug_options = new_array_from_c_array(2, 2, sizeof(string), _MOV((string[2]){_SLIT("-g"), _SLIT("-no-pie")}));
I promise this will all be automated eventually :) but whilst we're playing around, would you mind adding the following command to our list?
sudo sed -i "" "91227d" "$(port work vlang)/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c"
I'm going to go with a hunch and assume that v_win.c
is Windows-only, and so doesn't need to be patched.
Changed 3 years ago by barracuda156
Attachment: | main_10.5.8_v3.log added |
---|
Unfortunately, it fails likewise.
comment:24 Changed 3 years ago by harens (Haren S)
Unfortunately, it fails likewise.
I know this might not seem like it, but this is good news. We've fixed the -no-pie
error and moved on to a different error. These are baby steps to success my friend :)
Our current error is the following, which also happened on 10.6 PPC previously:
/opt/local/lib/gcc6/gcc/ppc-apple-darwin9/6.5.0/include/stdatomic.h:40:1: sorry, unimplemented: '_Atomic' in Objective-C typedef _Atomic _Bool atomic_bool;
The problem is that I still don't know how to fix this. Give me some time to think about this...
comment:25 follow-ups: 26 27 Changed 3 years ago by harens (Haren S)
Why don't we try the following:
> sudo port extract vlang > # Remove errno header > sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.13/vlib/sync/sync_darwin.c.v" > # Remove -no-pie flag > sudo sed -i "" "252d" "$(port work vlang)/v-weekly.2022.13/vlib/v/builder/cc.v" > sudo sed -i "" "91227d" "$(port work vlang)/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c" > # Remove Objective-C Flag > sudo sed -i "" "335d" "$(port work vlang)/v-weekly.2022.13/vlib/v/builder/cc.v" > sudo sed -i "" "91301d" "$(port work vlang)/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c" > sudo port -o install vlang
I'm not sure if this Objective-C patch will work. We are also slowly removing the more complex functionality provided by the V programming language, which isn't ideal. However, I guess there's no point complaining if we can't build V in the first place.
What I'm more curious about is that V had no issues building without any of these patches on the 10.6 i386 and x86_64 buildbots. It's surprising that this much work is needed for 10.6 ppc and 10.5.8.
comment:26 Changed 3 years ago by barracuda156
Replying to harens:
What I'm more curious about is that V had no issues building without any of these patches on the 10.6 i386 and x86_64 buildbots. It's surprising that this much work is needed for 10.6 ppc and 10.5.8.
It also fails on standard 10.6.8 when the build is done for ppc (with Rosetta):
The executable './thirdparty/tcc/tcc.exe' does not work. make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-10 -Os -arch ppc -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o v1.exe /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c -lm -lpthread -Wl,-headerpad_max_install_names -latomic /opt/local/lib/libMacportsLegacySupport.a -arch ppc ./v1.exe -no-parallel -o v2.exe -v -cg -showcc -prod -cc /opt/local/bin/gcc-mp-10 -cflags -Os cmd/v builder.compile() pref: all .v files before: v.pref.lookup_path: ['/usr/libexec/oah/vlib', '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/.home/.vmodules'] builder error: `builtin/` not included on module lookup path. Did you forget to add vlib to the path? (Use @vlib for default vlib) make: *** [all] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13" && /usr/bin/make -j4 -w all local=true VFLAGS="-v -cg -showcc -prod -cc /opt/local/bin/gcc-mp-10 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1 CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-10" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-10" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-10" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-10" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-10" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-10" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-10" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build vlang: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port vlang failed
So the problem is likely not the status of 10.6 PPC but rather that ppc arch needs some fixes.
Changed 3 years ago by barracuda156
Attachment: | main-10.6.8-rosetta.log added |
---|
This is without any custom fixes:
comment:27 Changed 3 years ago by barracuda156
Replying to harens:
Why don't we try the following:
> sudo port extract vlang > # Remove errno header > sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.13/vlib/sync/sync_darwin.c.v" > # Remove -no-pie flag > sudo sed -i "" "252d" "$(port work vlang)/v-weekly.2022.13/vlib/v/builder/cc.v" > sudo sed -i "" "91227d" "$(port work vlang)/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c" > # Remove Objective-C Flag > sudo sed -i "" "335d" "$(port work vlang)/v-weekly.2022.13/vlib/v/builder/cc.v" > sudo sed -i "" "91301d" "$(port work vlang)/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c" > sudo port -o install vlang
And here is the failure after these commands:
Using local vc Using local tcc make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13' The executable './thirdparty/tcc/tcc.exe' does not work. make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-10 -Os -arch ppc -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o v1.exe /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c -lm -lpthread -Wl,-headerpad_max_install_names -latomic /opt/local/lib/libMacportsLegacySupport.a -arch ppc /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c: In function 'v__builder__Builder_setup_ccompiler_options': /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c:94273:1: error: expected declaration or statement at end of input 94273 | } | ^ make: *** [all] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13" && /usr/bin/make -j4 -w all local=true VFLAGS="-v -cg -showcc -prod -cc /opt/local/bin/gcc-mp-10 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1 CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-10" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-10" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-10" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-10" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-10" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-10" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-10" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build vlang: command execution failed
Changed 3 years ago by barracuda156
Attachment: | main-10.6.8-rosetta_v2.log added |
---|
After following suggested procedure:
comment:28 follow-up: 29 Changed 3 years ago by harens (Haren S)
Oh I know why this happened. It's because the line numbers are changing when we remove lines from before. Here's the corrected version:
> sudo port extract vlang > # Remove errno header > sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.13/vlib/sync/sync_darwin.c.v" > # Remove -no-pie flag > sudo sed -i "" "252d" "$(port work vlang)/v-weekly.2022.13/vlib/v/builder/cc.v" > sudo sed -i "" "91227d" "$(port work vlang)/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c" > # Remove Objective-C Flag > sudo sed -i "" "334d" "$(port work vlang)/v-weekly.2022.13/vlib/v/builder/cc.v" > sudo sed -i "" "91300d" "$(port work vlang)/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c" > sudo port -o install vlang
comment:29 Changed 3 years ago by barracuda156
Replying to harens:
Oh I know why this happened. It's because the line numbers are changing when we remove lines from before. Here's the corrected version:
Today I can only check on Rosetta, and here is the error:
The executable './thirdparty/tcc/tcc.exe' does not work. make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-10 -Os -arch ppc -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o v1.exe /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1/v.c -lm -lpthread -Wl,-headerpad_max_install_names -latomic /opt/local/lib/libMacportsLegacySupport.a -arch ppc ./v1.exe -no-parallel -o v2.exe -v -cg -showcc -prod -cc /opt/local/bin/gcc-mp-10 -cflags -Os cmd/v builder.compile() pref: all .v files before: v.pref.lookup_path: ['/usr/libexec/oah/vlib', '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/.home/.vmodules'] builder error: `builtin/` not included on module lookup path. Did you forget to add vlib to the path? (Use @vlib for default vlib) make: *** [all] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.13" && /usr/bin/make -j4 -w all local=true VFLAGS="-v -cg -showcc -prod -cc /opt/local/bin/gcc-mp-10 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-de63146da0a0f93628f8a65e70267e2c8d4c7ce1 CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-10" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-10" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-10" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-10" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-10" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-10" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-10" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build vlang: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port vlang failed
Changed 3 years ago by barracuda156
Attachment: | main-10.6.8-rosetta_v3.log added |
---|
comment:30 follow-up: 31 Changed 3 years ago by harens (Haren S)
This error came up before with Rosetta, and I'm not surprised that it hasn't changed since I still don't know how to fix it yet...It's on my todo list :)
The suggested fixes so far are for non-Rosetta. Would it be possible to test them on your 10.5.8 and non-Rosetta 10.6 ppc machines? Thanks.
comment:31 Changed 3 years ago by barracuda156
Replying to harens:
The suggested fixes so far are for non-Rosetta. Would it be possible to test them on your 10.5.8 and non-Rosetta 10.6 ppc machines? Thanks.
Yes, I will do that today, I hope. Line numbers did not change with the latest version update?
comment:32 follow-up: 33 Changed 3 years ago by harens (Haren S)
Yes, I will do that today, I hope. Line numbers did not change with the latest version update?
Good catch. Here's the updated version:
> sudo port extract vlang > # Remove errno header > sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.15/vlib/sync/sync_darwin.c.v" > # Remove -no-pie flag > sudo sed -i "" "255d" "$(port work vlang)/v-weekly.2022.15/vlib/v/builder/cc.v" > sudo sed -i "" "91657d" "$(port work vlang)/vc-48b30963c895f6b0d9aa353066a286c100b56b0c/v.c" > # Remove Objective-C Flag > sudo sed -i "" "337d" "$(port work vlang)/v-weekly.2022.15/vlib/v/builder/cc.v" > sudo sed -i "" "91730d" "$(port work vlang)/vc-48b30963c895f6b0d9aa353066a286c100b56b0c/v.c" > sudo port -o install vlang
comment:33 Changed 3 years ago by barracuda156
Replying to harens:
Yes, I will do that today, I hope. Line numbers did not change with the latest version update?
Good catch. Here's the updated version:
> sudo port extract vlang > # Remove errno header > sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.15/vlib/sync/sync_darwin.c.v" > # Remove -no-pie flag > sudo sed -i "" "255d" "$(port work vlang)/v-weekly.2022.15/vlib/v/builder/cc.v" > sudo sed -i "" "91657d" "$(port work vlang)/vc-48b30963c895f6b0d9aa353066a286c100b56b0c/v.c" > # Remove Objective-C Flag > sudo sed -i "" "337d" "$(port work vlang)/v-weekly.2022.15/vlib/v/builder/cc.v" > sudo sed -i "" "91730d" "$(port work vlang)/vc-48b30963c895f6b0d9aa353066a286c100b56b0c/v.c" > sudo port -o install vlang
It has build on 10.6 PPC, but destroot failed:
xinstall: mkdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/destroot/opt/local/share/examples xinstall: mkdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/destroot/opt/local/lib/vlang Error: Failed to destroot vlang: could not set group for file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/destroot/opt/local/lib/vlang": group "_developer" does not exist Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port vlang faile
Changed 3 years ago by barracuda156
Attachment: | main_10A190_destroot_fail.log added |
---|
comment:34 follow-up: 37 Changed 3 years ago by harens (Haren S)
The build succeeded! 🎉 Thank you for your perseverance and help in getting this far.
It's interesting that the _developer
group doesn't exist, but that shouldn't be an issue. I'll push out a patch to fix the destroot.
Would you then mind updating your vlang port and trying again? Thanks.
comment:35 Changed 3 years ago by Haren S <12570877+harens@…>
comment:36 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
You shouldn't create users or groups within phases like the destroot phase, since those phases will not run when the user receives a binary. adduser
and addgroup
are old commands that predate our distribution of binaries and shouldn't be used anymore. Their replacement is add_users
which you should use instead (outside of any phase). See #38440 and browser:macports-base/doc/portfile.7.
comment:37 Changed 3 years ago by barracuda156
Replying to harens:
The build succeeded! 🎉 Thank you for your perseverance and help in getting this far.
It's interesting that the
_developer
group doesn't exist, but that shouldn't be an issue. I'll push out a patch to fix the destroot.Would you then mind updating your vlang port and trying again? Thanks.
Should I rather wait until the issue that Ryan mentions is fixed?
comment:38 follow-up: 39 Changed 3 years ago by harens (Haren S)
Should I rather wait until the issue that Ryan mentions is fixed?
I've patched it with the new weekly build. Thanks Ryan for the suggestion.
If you wouldn't mind updating, here's the new set of commands:
> sudo port extract vlang > # Remove errno header > sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.16/vlib/sync/sync_darwin.c.v" > # Remove -no-pie flag > sudo sed -i "" "255d" "$(port work vlang)/v-weekly.2022.16/vlib/v/builder/cc.v" > sudo sed -i "" "91905d" "$(port work vlang)/vc-4505557b56638eb931182f764580767e22cf110d/v.c" > # Remove Objective-C Flag > sudo sed -i "" "337d" "$(port work vlang)/v-weekly.2022.16/vlib/v/builder/cc.v" > sudo sed -i "" "91978d" "$(port work vlang)/vc-4505557b56638eb931182f764580767e22cf110d/v.c" > sudo port -o install vlang
comment:39 Changed 3 years ago by barracuda156
Replying to harens:
Should I rather wait until the issue that Ryan mentions is fixed?
I've patched it with the new weekly build. Thanks Ryan for the suggestion.
If you wouldn't mind updating, here's the new set of commands:
> sudo port extract vlang > # Remove errno header > sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.16/vlib/sync/sync_darwin.c.v" > # Remove -no-pie flag > sudo sed -i "" "255d" "$(port work vlang)/v-weekly.2022.16/vlib/v/builder/cc.v" > sudo sed -i "" "91905d" "$(port work vlang)/vc-4505557b56638eb931182f764580767e22cf110d/v.c" > # Remove Objective-C Flag > sudo sed -i "" "337d" "$(port work vlang)/v-weekly.2022.16/vlib/v/builder/cc.v" > sudo sed -i "" "91978d" "$(port work vlang)/vc-4505557b56638eb931182f764580767e22cf110d/v.c" > sudo port -o install vlang
It worked! 36-248% port -v installed vlang
The following ports are currently installed: vlang @2022.16_0 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-04-19T05:59:55+0800'
comment:40 Changed 3 years ago by harens (Haren S)
Yay! If you haven't done so already, would you mind trying out some simple test cases (maybe hello world, v doctor
) just to check that everything works as expected.
What condition should I apply on these patches? Are they ppc or pre-10.7 issues?
Also, there's an issue pre-10.12 for some more advanced code that I'm aware of (upstream issue). I might need your help testing some fixes at some point :) But thank you for all your assistance with this ticket.
comment:41 follow-up: 44 Changed 3 years ago by harens (Haren S)
Oh and there's also Rosetta that I haven't dealt with yet. Would you mind deleting /usr/libexec/oah/vlib
and building it again?
comment:42 Changed 3 years ago by barracuda156
Just for the record, I tried now on 10.4.11, and it failed quickly:
---> Building vlang Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16" && /usr/bin/make -j1 -w all local=true VFLAGS="-v -cg -showcc -show-c-output -prod -cc /opt/local/bin/gcc-mp-7 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-4505557b56638eb931182f764580767e22cf110d CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-7" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-7" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-7" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-7" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-7" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-7" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-7" INSTALL="/usr/bin/install -c" make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16' Using local vc Using local tcc make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16' The executable './thirdparty/tcc/tcc.exe' does not work. make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-7 -Os -arch ppc -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o v1.exe /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-4505557b56638eb931182f764580767e22cf110d/v.c -lm -lpthread -Wl,-headerpad_max_install_names -latomic -L/opt/local/lib -lMacportsLegacySupport -arch ppc /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-4505557b56638eb931182f764580767e22cf110d/v.c: In function 'os__unsetenv': /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-4505557b56638eb931182f764580767e22cf110d/v.c:22312:13: error: void value not ignored as it ought to be int _t2 = unsetenv(((char*)(name.str))); ^~~~~~~~ make: *** [all] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16" && /usr/bin/make -j1 -w all local=true VFLAGS="-v -cg -showcc -show-c-output -prod -cc /opt/local/bin/gcc-mp-7 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-4505557b56638eb931182f764580767e22cf110d CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-7" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-7" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-7" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-7" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-7" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-7" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-7" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build vlang: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port vlang failed
comment:43 Changed 3 years ago by barracuda156
And on 10.5.8 it did build successfully, though ignoring +universal:
36-163:~ svacchanda$ port -v installed vlang The following ports are currently installed: vlang @2022.16_1 (active) requested_variants='' platform='darwin 9' archs='ppc' date='2022-04-22T05:11:54+0800'
comment:44 Changed 3 years ago by barracuda156
Replying to harens:
Oh and there's also Rosetta that I haven't dealt with yet. Would you mind deleting
/usr/libexec/oah/vlib
and building it again?
There is no such file or folder there. I have tried the latest vlang
on Rosetta now, it still fails:
macmini:~ svacchanda$ sudo port clean vlang ---> Cleaning vlang macmini:~ svacchanda$ sudo port extract vlang ---> Fetching distfiles for vlang ---> Verifying checksums for vlang ---> Extracting vlang macmini:~ svacchanda$ sudo sed -i "" "10d" "$(port work vlang)/v-weekly.2022.16/vlib/sync/sync_darwin.c.v" macmini:~ svacchanda$ sudo sed -i "" "255d" "$(port work vlang)/v-weekly.2022.16/vlib/v/builder/cc.v" macmini:~ svacchanda$ sudo sed -i "" "91905d" "$(port work vlang)/vc-4505557b56638eb931182f764580767e22cf110d/v.c" macmini:~ svacchanda$ sudo sed -i "" "337d" "$(port work vlang)/v-weekly.2022.16/vlib/v/builder/cc.v" macmini:~ svacchanda$ sudo sed -i "" "91978d" "$(port work vlang)/vc-4505557b56638eb931182f764580767e22cf110d/v.c" macmini:~ svacchanda$ sudo port -v -n -o install vlang ---> Computing dependencies for vlang. ---> Applying patches to vlang ---> Applying patch-freetype2-prefix.diff Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/lang/vlang/files/patch-freetype2-prefix.diff' patching file vlib/fontstash/a_d_use_freetype.v ---> Applying patch-openssl-prefix.diff Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/lang/vlang/files/patch-openssl-prefix.diff' patching file vlib/net/openssl/c.v ---> Applying patch-clock-gettime.diff Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/lang/vlang/files/patch-clock-gettime.diff' patching file vlib/time/time_nix.c.v ---> Patching cc.v: s|-mmacosx-version-min=10.7|-mmacosx-version-min=10.6| ---> Patching v.c: s|-mmacosx-version-min=10.7|-mmacosx-version-min=10.6| ---> Patching c.v: s|@PREFIX@|/opt/local|g ---> Patching a_d_use_freetype.v: s|@PREFIX@|/opt/local|g ---> Patching time_nix.c.v: s|@PREFIX@|/opt/local|g ---> Configuring vlang ---> Building vlang Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16" && /usr/bin/make -j4 -w all local=true VFLAGS="-v -cg -showcc -show-c-output -prod -cc /opt/local/bin/gcc-mp-11 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-4505557b56638eb931182f764580767e22cf110d CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-11" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-11" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-11" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-11" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-11" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-11" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-11" INSTALL="/usr/bin/install -c" make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16' Using local vc Using local tcc make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16' The executable './thirdparty/tcc/tcc.exe' does not work. make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-11 -Os -arch ppc -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o v1.exe /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-4505557b56638eb931182f764580767e22cf110d/v.c -lm -lpthread -Wl,-headerpad_max_install_names -latomic -L/opt/local/lib -lMacportsLegacySupport -arch ppc ./v1.exe -no-parallel -o v2.exe -v -cg -showcc -show-c-output -prod -cc /opt/local/bin/gcc-mp-11 -cflags -Os cmd/v builder.compile() pref: all .v files before: v.pref.lookup_path: ['/usr/libexec/oah/vlib', '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/.home/.vmodules'] builder error: `builtin/` not included on module lookup path. Did you forget to add vlib to the path? (Use @vlib for default vlib) make: *** [all] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16" && /usr/bin/make -j4 -w all local=true VFLAGS="-v -cg -showcc -show-c-output -prod -cc /opt/local/bin/gcc-mp-11 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-4505557b56638eb931182f764580767e22cf110d CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-11" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-11" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-11" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-11" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-11" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-11" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-11" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build vlang: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port vlang failed
Changed 3 years ago by barracuda156
Attachment: | main-10.6.8-rosetta_v4.log added |
---|
comment:45 Changed 3 years ago by barracuda156
Did line numbers change? I cannot upgrade to the latest version, it fails at the very beginning now:
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16' The executable './thirdparty/tcc/tcc.exe' does not work. make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-6 -Os -arch ppc -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o v1.exe /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-4505557b56638eb931182f764580767e22cf110d/v.c -lm -lpthread -Wl,-headerpad_max_install_names -latomic -L/opt/local/lib -lMacportsLegacySupport -arch ppc make: posix_spawn: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-6: No such file or directory make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2022.16" && /usr/bin/make -j4 -w all local=true VFLAGS="-v -cg -showcc -show-c-output -prod -cc /opt/local/bin/gcc-mp-6 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/vc-4505557b56638eb931182f764580767e22cf110d CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-6" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-6" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-6" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-6" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-6" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-6" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-6" INSTALL="/usr/bin/install -c" Exit code: 2
comment:46 follow-ups: 47 48 Changed 3 years ago by harens (Haren S)
Did line numbers change? I cannot upgrade to the latest version, it fails at the very beginning now:
Thank you for the logs. I haven't changed anything recently, so I'm not yet sure about the error.
I'm afraid I have some exams I need to study for, which will finish in late June. I will get back to this ticket after that.
comment:47 Changed 3 years ago by barracuda156
Replying to harens:
Thank you for the logs. I haven't changed anything recently, so I'm not yet sure about the error.
I'm afraid I have some exams I need to study for, which will finish in late June. I will get back to this ticket after that.
Thank you, sure.
comment:48 Changed 3 years ago by barracuda156
Replying to harens:
Did line numbers change? I cannot upgrade to the latest version, it fails at the very beginning now:
Thank you for the logs. I haven't changed anything recently, so I'm not yet sure about the error.
I'm afraid I have some exams I need to study for, which will finish in late June. I will get back to this ticket after that.
I have to apologize, that was some error on my end. Possibly due to migrating to a new libgcc11, but in any case, there is no problem with your solution, it builds on 10.6 PPC:
36-111% port -v installed vlang The following ports are currently installed: vlang @2022.16_0 requested_variants='' platform='darwin 10' archs='ppc' date='2022-04-19T05:59:55+0800' vlang @2022.16_1 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-05-18T09:24:57+0800'
So only Rosetta and Tiger fail. Leopard and SL PPC work.
comment:49 Changed 2 years ago by harens <12570877+harens@…>
comment:50 follow-ups: 51 52 Changed 2 years ago by harens (Haren S)
I've added the errno header patch to the portfile, and before I left, I sent the objective-c and -no-pie patches upstream.
On the systems where vlang successfully built with modifications, would you mind testing the latest release? My memory of this ticket is a bit hazy, but I'm hoping the patches should work.
comment:51 Changed 2 years ago by barracuda156
Replying to harens:
I've added the errno header patch to the portfile, and before I left, I sent the objective-c and -no-pie patches upstream.
On the systems where vlang successfully built with modifications, would you mind testing the latest release? My memory of this ticket is a bit hazy, but I'm hoping the patches should work.
Thank you!
I will test these next month, currently away from PPC hardware.
comment:52 Changed 2 years ago by barracuda156
Replying to harens:
I've added the errno header patch to the portfile, and before I left, I sent the objective-c and -no-pie patches upstream.
On the systems where vlang successfully built with modifications, would you mind testing the latest release? My memory of this ticket is a bit hazy, but I'm hoping the patches should work.
On 10.6.8 Rosetta vlang
fails now with:
builder error: `builtin/` not included on module lookup path. Did you forget to add vlib to the path? (Use @vlib for default vlib) make: *** [all] Error 1
Unmodified portfile, gcc12
.
comment:53 follow-ups: 54 56 Changed 2 years ago by harens (Haren S)
Thanks for testing. That seems to be the same error as before, which I guess makes sense since I haven't made any Rosetta modifications yet. I'll try and have a think about how to fix this.
Would you be able to test the port on the systems where it worked with modifications? I think that was 10.5 and 10.6 PPC. Thanks.
comment:54 Changed 2 years ago by barracuda156
Replying to harens:
Thanks for testing. That seems to be the same error as before, which I guess makes sense since I haven't made any Rosetta modifications yet. I'll try and have a think about how to fix this.
Thank you!
Would you be able to test the port on the systems where it worked with modifications? I think that was 10.5 and 10.6 PPC. Thanks.
Sure, but by the end of month.
- S. There is some discussion of PPC here: https://github.com/vlang/v/issues/15425
comment:55 Changed 19 months ago by barracuda156
Just to give an update, current version of vlags
builds fine on 10.6 PPC as-is, no trickery like before.
Rosetta still fails with:
---> Building vlang Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2023.15" && /usr/bin/make -j6 -w all local=true VFLAGS="-v -cg -showcc -show-c-output -prod -cc /opt/local/bin/gcc-mp-12 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2023.15/vc CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-12" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-12" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-12" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-12" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-12" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-12" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-12" INSTALL="/usr/bin/install -c" make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2023.15' Using local tcc Using local vc make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2023.15' The executable './thirdparty/tcc/tcc.exe' does not work. make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2023.15' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-12 -Os -arch ppc -std=gnu99 -w -o v1.exe /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2023.15/vc/v.c -lm -lpthread -Wl,-headerpad_max_install_names -latomic -L/opt/local/lib -lMacportsLegacySupport -arch ppc ./v1.exe -no-parallel -o v2.exe -v -cg -showcc -show-c-output -prod -cc /opt/local/bin/gcc-mp-12 -cflags -Os cmd/v all .v files before: v.pref.lookup_path: ['/usr/libexec/oah/vlib', '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/.home/.vmodules'] builder error: `builtin/` not included on module lookup path. Did you forget to add vlib to the path? (Use @vlib for default vlib) make: *** [all] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2023.15' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2023.15" && /usr/bin/make -j6 -w all local=true VFLAGS="-v -cg -showcc -show-c-output -prod -cc /opt/local/bin/gcc-mp-12 -cflags -Os" VC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-weekly.2023.15/vc CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cc/opt/local/bin/gcc-mp-12" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/cxx/opt/local/bin/g++-mp-12" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objc/opt/local/bin/gcc-mp-12" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/objcxx/opt/local/bin/g++-mp-12" FC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/fc/opt/local/bin/gfortran-mp-12" F77="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f77/opt/local/bin/gfortran-mp-12" F90="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/compwrap/f90/opt/local/bin/gfortran-mp-12" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build vlang: command execution failed
comment:56 Changed 10 months ago by barracuda156
Replying to harens:
Something got broken:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c: In function '__closure_alloc': /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c:16418:51: error: '__closure_thunk' undeclared (first use in this function); did you mean '__closure_alloc'? 16418 | #define _CLOSURE_SIZE (((2*sizeof(void*) > sizeof(__closure_thunk) ? 2*sizeof(void*) : sizeof(__closure_thunk)) + sizeof(void*) - 1) & ~(sizeof(void*) - 1)) | ^~~~~~~~~~~~~~~ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c:16528:40: note: in expansion of macro '_CLOSURE_SIZE' 16528 | int remaining = _V_page_size / _CLOSURE_SIZE; | ^~~~~~~~~~~~~ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c:16418:51: note: each undeclared identifier is reported only once for each function it appears in 16418 | #define _CLOSURE_SIZE (((2*sizeof(void*) > sizeof(__closure_thunk) ? 2*sizeof(void*) : sizeof(__closure_thunk)) + sizeof(void*) - 1) & ~(sizeof(void*) - 1)) | ^~~~~~~~~~~~~~~ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c:16528:40: note: in expansion of macro '_CLOSURE_SIZE' 16528 | int remaining = _V_page_size / _CLOSURE_SIZE; | ^~~~~~~~~~~~~ In file included from /usr/include/string.h:148, from /opt/local/include/LegacySupport/string.h:25, from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c:805: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c: In function '__closure_init': /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c:16566:30: error: '__CLOSURE_GET_DATA_BYTES' undeclared (first use in this function); did you mean '__CLOSURE_GET_DATA'? 16566 | memcpy(_closure_ptr, __CLOSURE_GET_DATA_BYTES, sizeof(__CLOSURE_GET_DATA_BYTES)); | ^~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c:16418:51: error: '__closure_thunk' undeclared (first use in this function); did you mean '__closure_init'? 16418 | #define _CLOSURE_SIZE (((2*sizeof(void*) > sizeof(__closure_thunk) ? 2*sizeof(void*) : sizeof(__closure_thunk)) + sizeof(void*) - 1) & ~(sizeof(void*) - 1)) | ^~~~~~~~~~~~~~~ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c:16569:25: note: in expansion of macro '_CLOSURE_SIZE' 16569 | _closure_ptr += _CLOSURE_SIZE; | ^~~~~~~~~~~~~ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c: In function '__closure_create': /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c:16418:51: error: '__closure_thunk' undeclared (first use in this function); did you mean '__closure_init'? 16418 | #define _CLOSURE_SIZE (((2*sizeof(void*) > sizeof(__closure_thunk) ? 2*sizeof(void*) : sizeof(__closure_thunk)) + sizeof(void*) - 1) & ~(sizeof(void*) - 1)) | ^~~~~~~~~~~~~~~ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_vlang/vlang/work/v-0.4.3/vc/v.c:16581:25: note: in expansion of macro '_CLOSURE_SIZE' 16581 | _closure_ptr += _CLOSURE_SIZE; | ^~~~~~~~~~~~~ make: *** [all] Error 1
comment:57 Changed 10 months ago by barracuda156
https://github.com/vlang/v/issues/20507
Related: https://github.com/vlang/v/issues/18737
Somehow this worked earlier, despite a lack of arch-specific code there. And now it does not.
UPD. There is nothing to be done here from the port maintainer side, to be clear. I hope I can handle it with upstream. I post updates on the matter just for information.
Hi there! Thanks for opening this ticket and for your comments on the original commit.
Good to know. I'll make this change. Judging by #62688, I also need to blacklist clang < 700.
That's interesting. I would've thought that
errno.h
comes with the command line tools?For your machine, I would've thought that the header file would be in
/usr/include/errno.h
.