On Wed, Nov 01, 2023 at 10:31:39PM +0100, Theo Buehler wrote:
> I ran a bulk with the full diff removing syscall from libc and kernel
> applied. Here's what broke or threw a warning. Running nm on .o files
> in WRKDIR didn't find any unexpected 'syscall U'.
> 
> Non-Go ports with warnings or build failures. Some details at the end:

Fix from jca pending in this thread:

> net/torsocks                  probably BROKEN

Fixed:

> print/luametatex              easy fix
> x11/qt{5,6}/qtwebengine               easy fix

As far as I'm aware, this means the remaining work is to fix Go ports,
which involves figuring out how to patch them one way or the other.

To identify which Go ports need fixing, jsing suggested I add the patch
attached at the end to force external linking (and suppress a noisy
warning). This looks as follows:

ld: error: undefined symbol: syscall
>>> referenced by go.go
>>>               
>>> /tmp/pobj/influxdb-2.7.1/build-amd64/go-link-350984573/go.o:(syscall.libc_syscall_trampoline.abi0)
cc: error: linker command failed with exit code 1 (use -v to see invocation)

databases/bbolt
databases/influx-cli
databases/influxdb
databases/mongo-tools
databases/victoriametrics
devel/git-lfs
devel/github-cli
devel/hub
devel/promu
devel/reposurgeon
devel/tea
editors/micro
games/clidle
mail/aerc
mail/opensmtpd-filters/rspamd
minio/server
net/amfora
net/bombadillo
net/dendrite
net/dt
net/eduvpn/vpn-daemon
net/gomuks
net/headscale
net/irtt
net/mattermost-server
net/minio/client
net/sping
net/stayrtr
net/syncthing
net/tailscale
net/termshark
net/wormhole-william
net/yggdrasil-go
security/cfssl
security/gopass
security/keybase
security/nuclei
security/ogvt
security/sops
security/step-ca
security/step-cli
security/vault
shells/elvish
sysutils/alertmanager
sysutils/amazon-ecs-cli
sysutils/amazon-ssm-agent
sysutils/beats/filebeat
sysutils/beats/heartbeat
sysutils/beats/metricbeat
sysutils/beats/packetbeat
sysutils/blackbox_exporter
sysutils/consul
sysutils/dep
sysutils/direnv
sysutils/docker-cli
sysutils/duf
sysutils/exoscale-cli
sysutils/fleetctl
sysutils/fzf
sysutils/gitlab-runner
sysutils/hcloud
sysutils/kopia
sysutils/lf
sysutils/loki
sysutils/node_exporter
sysutils/nomad
sysutils/oc
sysutils/packer
sysutils/promscale
sysutils/rclone
sysutils/serf
sysutils/snmp_exporter
sysutils/stripe-cli
sysutils/telegraf
sysutils/terraform
sysutils/terragrunt
textproc/gron
textproc/pup
textproc/terraform-docs
textproc/uni
www/gitea
www/gotosocial
www/shiori

Index: patches/patch-src_cmd_link_internal_ld_config_go
===================================================================
RCS file: patches/patch-src_cmd_link_internal_ld_config_go
diff -N patches/patch-src_cmd_link_internal_ld_config_go
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_cmd_link_internal_ld_config_go    2 Nov 2023 23:24:43 
-0000
@@ -0,0 +1,12 @@
+Index: src/cmd/link/internal/ld/config.go
+--- src/cmd/link/internal/ld/config.go.orig
++++ src/cmd/link/internal/ld/config.go
+@@ -173,7 +173,7 @@ func mustLinkExternal(ctxt *Link) (res bool, reason st
+               return true, fmt.Sprintf("some packages could not be built to 
support internal linking (%v)", dynimportfail)
+       }
+ 
+-      return false, ""
++      return true, ""
+ }
+ 
+ // determineLinkMode sets ctxt.LinkMode.
Index: patches/patch-src_cmd_link_internal_ld_lib_go
===================================================================
RCS file: /cvs/ports/lang/go/patches/patch-src_cmd_link_internal_ld_lib_go,v
diff -u -p -r1.22 patch-src_cmd_link_internal_ld_lib_go
--- patches/patch-src_cmd_link_internal_ld_lib_go       17 Oct 2023 03:52:18 
-0000      1.22
+++ patches/patch-src_cmd_link_internal_ld_lib_go       2 Nov 2023 23:24:33 
-0000
@@ -1,6 +1,15 @@
 Index: src/cmd/link/internal/ld/lib.go
 --- src/cmd/link/internal/ld/lib.go.orig
 +++ src/cmd/link/internal/ld/lib.go
+@@ -446,7 +446,7 @@ func loadinternal(ctxt *Link, name string) *sym.Librar
+               if pname := ctxt.PackageFile[name]; pname != "" {
+                       return addlibpath(ctxt, "internal", "internal", pname, 
name, "", zerofp)
+               }
+-              ctxt.Logf("loadinternal: cannot find %s\n", name)
++              // ctxt.Logf("loadinternal: cannot find %s\n", name)
+               return nil
+       }
+ 
 @@ -1428,6 +1428,7 @@ func (ctxt *Link) hostlink() {
                }
        case objabi.Hopenbsd:

Reply via email to