ā07-07-2022 01:26 PM
The NSO Darwin install of NSO for my M1 Macbook works fine for ncs and java, however the python vm fails to load. Looking in the ncs-python-vm.log, it states that the mach-o file is of type x86_64.
ImportError: dlopen(/Users/sam/Documents/ncs/install-5.5.2.12/src/ncs/pyapi/_ncs/_ncs_py3.abi3.so, 0x0002): tried: '/Users/sam/Documents/ncs/install-5.3.5.1/src/ncs/pyapi/_ncs/_ncs_py3.abi3.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
I tried going into the src/ncs/pyapi/ directory to try to remake the files, however the make of the pyapi fails with the following error.
~/Documents/ncs/install-5.5.2.12/src/ncs/pyapi āÆ make confd-py3 make: *** No rule to make target `_confd/_confd.c', needed by `_confd/_confd_py3.abi3.so'. Stop. ~/Documents/ncs/install-5.5.2.12/src/ncs/pyapi āÆ make ncs-py3 make: *** No rule to make target `../ncs/dm/tailf-ncs.yang', needed by `tmp_fxs/tailf-ncs.fxs'. Stop.
Which I'm guessing is because I don't have a local install of the ConfD library.
Requirements ============ The build requires gcc and GNU make and the development libraries for Python 3.5 or greater. It's also necessary to have access to a built libconfd library.
When I go to the tailf site, ConfD basic installs are no longer available (currently).
https://developer.cisco.com/site/confD/downloads/
Solved! Go to Solution.
ā11-03-2022 01:33 AM - edited ā10-19-2023 08:23 AM
Update: NSO for Darwin ARM64 is supported for NSO 6.1.1 and later releases, recommended for Apple Silicon M1, M2, etc.
When using the NSO for Darwin x86_64 version, make sure you use the Python version that comes with MacOS on M1. That works. No recompiling is necessary. I.e. use the following settings:
$ arch -x86_64 bash -l
$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.
$ arch
i386
$ which python3
/usr/bin/python3
$ python3 --version
Python 3.9.6
$ java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.292-b10, mixed mode)
ā07-22-2022 02:14 PM
Hi samuel.coome@secunetics.com,
Yes, the download page has downloads temporarily disabled. Did you email confdbasicinfo@cisco.com and ask for help? I looked around the Cisco mailing lists and that is the best place to ask directly.
Best,
Alex S.
ā11-02-2022 06:19 AM
Hello,
I'm having the same issue:
From logs/ncs-python-vm.log I can see:
<INFO> 2-Nov-2022::14:07:03.970 MAC ncs[30773]: l2vpn :: Starting python3 -u /Users/user/nso-5.8/src/ncs/pyapi/ncs_pyvm/startup.py -l info -f ./logs/ncs-python-vm -i l2vpn
Traceback (most recent call last):
File "/Users/user/nso-5.8/src/ncs/pyapi/ncs_pyvm/startup.py", line 6, in <module>
import ncsctlsock
File "/Users/user/nso-5.8/src/ncs/pyapi/ncs_pyvm/ncsctlsock.py", line 5, in <module>
import _ncs
File "/Users/user/nso-5.8/src/ncs/pyapi/_ncs/__init__.py", line 12, in <module>
from ._ncs_py3 import cdb
I installed confd and compiled it. I then tried to compile ncs, but I get this error:
ā°userā~/n/s/n/pyapiā±āā» make ncs-py3
PROD=NCS /Library/Developer/CommandLineTools/usr/bin/make src/gen_add_lib_const.c
# Clean all Python 3 so files, including possible leftovers. Possibly built
# with a previous Python 3 version, which might make them differ in naming.
Building NCS Python 3.x bindings
running build_ext
building '_ncs._ncs_py3' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DCONFD_PY_PRODUCT_NCS=1 -DCONFD_C_PRODUCT_NCS=1 -D_TM=\"_ncs\" -UNDEBUG -I/Users/user/confd/include -Iinclude -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c _ncs/_ncs.c -o build/_ncs/_ncs_py3.abi3.so/_ncs/_ncs.o -std=c99
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DCONFD_PY_PRODUCT_NCS=1 -DCONFD_C_PRODUCT_NCS=1 -D_TM=\"_ncs\" -UNDEBUG -I/Users/user/confd/include -Iinclude -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c src/_cdb.c -o build/_ncs/_ncs_py3.abi3.so/src/_cdb.o -std=c99
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DCONFD_PY_PRODUCT_NCS=1 -DCONFD_C_PRODUCT_NCS=1 -D_TM=\"_ncs\" -UNDEBUG -I/Users/user/confd/include -Iinclude -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c src/_dp.c -o build/_ncs/_ncs_py3.abi3.so/src/_dp.o -std=c99
src/_dp.c:6200:26: error: use of undeclared identifier 'CONFD_ERRTYPE_NCS'
if (errinfo->type == CONFD_ERRTYPE_NCS) {
^
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
make: *** [_ncs/_ncs_py3.abi3.so] Error 1
ā°userā~/n/s/n/pyapiā±āā»
Is this a known issue?
ā11-03-2022 01:33 AM - edited ā10-19-2023 08:23 AM
Update: NSO for Darwin ARM64 is supported for NSO 6.1.1 and later releases, recommended for Apple Silicon M1, M2, etc.
When using the NSO for Darwin x86_64 version, make sure you use the Python version that comes with MacOS on M1. That works. No recompiling is necessary. I.e. use the following settings:
$ arch -x86_64 bash -l
$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.
$ arch
i386
$ which python3
/usr/bin/python3
$ python3 --version
Python 3.9.6
$ java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.292-b10, mixed mode)
ā11-03-2022 03:30 AM - edited ā11-03-2022 03:30 AM
That did the trick! Thanks!
Can you maybe update the documentation to cover this? It would help other avoid the traditional google-fu.
ā11-03-2022 06:00 AM
Agree those steps could be added to the installation guide. Generic M1 Mac Rosetta 2 dependant commands however that may be different tomorrow. And the need for them will be obsoleted when NSO for Darwin ARM64 is supported (not only x86_64) in the not-so-distant future.
ā10-19-2023 08:17 AM
Update: NSO for Darwin ARM64 is supported for NSO 6.1.1 and later releases, recommended for Apple Silicon M1, M2, etc.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide