[MacPorts] #64913: vlang fails for PowerPC: -latomic flag needed, Header file <sys/errno.h>, needed for module `sync` was not found

MacPorts noreply at macports.org
Tue Apr 5 17:30:02 UTC 2022


#64913: vlang fails for PowerPC: -latomic flag needed, Header file <sys/errno.h>,
needed for module `sync` was not found
---------------------------+-------------------------------------------
  Reporter:  barracuda156  |      Owner:  harens
      Type:  defect        |     Status:  accepted
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.7.2
Resolution:                |   Keywords:  powerpc, leopard, snowleopard
      Port:  vlang         |
---------------------------+-------------------------------------------

Comment (by barracuda156):

 Replying to [comment:19 harens]:
 > 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
 [https://github.com/vlang/v/commit/8f6fec4364b5eaf00a5ae07c70517cc3fc74e33b
 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 :)

 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
 }}}

 P. S. I use `gcc6` now because of compilers transition which I mentioned
 above.

-- 
Ticket URL: <https://trac.macports.org/ticket/64913#comment:20>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list