Opened 2 months ago

Last modified 12 hours ago

#62717 assigned defect

net-snmp build fails on arm64 Undefined symbol _vm_region

Reported by: p-b-west (Peter West) Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: arm64 Cc: fracai
Port: net-snmp


In the process of building gimp, build of net-snmp fails.

:info:build Undefined symbols for architecture arm64:
:info:build   "_vm_region", referenced from:
:info:build       _pages_swapped in memory_darwin.o

Attachments (1)

main.log (590.0 KB) - added by p-b-west (Peter West) 2 months ago.
Log file for net-snmp build

Download all attachments as: .zip

Change History (5)

Changed 2 months ago by p-b-west (Peter West)

Attachment: main.log added

Log file for net-snmp build

comment:1 Changed 2 months ago by jmroot (Joshua Root)

Keywords: arm64 added
Owner: set to ryandesign
Port: net-snmp added
Status: newassigned

comment:2 Changed 15 hours ago by fracai

Cc: fracai added

comment:3 Changed 15 hours ago by fracai

I'm also experiencing this error as a dep of sane-backends. Is there any additional information or testing that would be helpful in resolving this?

comment:4 Changed 12 hours ago by fracai

I was able to get this a bit further by modifying: .../work/net-snmp-5.9/agent/mibgroup/hardware/memory/memory_darwin.c:81 to add || defined(__aarch64__) to the end of the line.

Then the port fails with:

/usr/bin/clang -c   -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_net-snmp/net-snmp/work/net-snmp-5.9/include -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch arm64 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch arm64 -Udarwin20 -Ddarwin20=darwin20 -I/opt/local/include -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -I. -I/opt/local/include -fno-common -DPERL_DARWIN -mmacosx-version-min=10.16 -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk  -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -Wformat -O3   -DVERSION=\"5.09\" -DXS_VERSION=\"5.09\"  "-I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE"   default_store.c
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk' [-Wmissing-sysroot]
In file included from default_store.xs:2:
/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE/perl.h:684:10: fatal error: 'sys/types.h' file not found
#include <sys/types.h>
1 error generated.
make[2]: *** [default_store.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_net-snmp/net-snmp/work/net-snmp-5.9/perl/default_store'
make[1]: *** [subdirs] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_net-snmp/net-snmp/work/net-snmp-5.9/perl'
make: *** [perlmodules] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_net-snmp/net-snmp/work/net-snmp-5.9'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_net-snmp/net-snmp/work/net-snmp-5.9" && /usr/bin/make -j8 -w all 
Exit code: 2
Error: Failed to build net-snmp: command execution failed
DEBUG: Error code: CHILDSTATUS 63603 2
DEBUG: Backtrace: command execution failed
DEBUG:     while executing
DEBUG: "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
DEBUG:     invoked from within
DEBUG: "command_exec -callback portprogress::target_progress_callback build"
DEBUG:     (procedure "portbuild::build_main" line 8)
DEBUG:     invoked from within
DEBUG: "$procedure $targetname"

This looks similar to: #62227, #59951, #62440. So maybe a similar fix?

Note: See TracTickets for help on using tickets.