Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails on macos15 #79

Open
jkooten opened this issue Oct 10, 2024 · 2 comments
Open

Installation fails on macos15 #79

jkooten opened this issue Oct 10, 2024 · 2 comments

Comments

@jkooten
Copy link

jkooten commented Oct 10, 2024

Hi, Installation faile son macos15 following the steps in readme. ports are installed as required.

make all-recursive
make[1]: Entering directory '/Users/user/workspaces/docsis'
Making all in src
make[2]: Entering directory '/Users/user/workspaces/docsis/src'
gcc -DHAVE_CONFIG_H -I. -I.. -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -Os -pipe -DBUILD=177 -DMACOSX_DEPLOYMENT_TARGET=15.0 --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -iframeworkwithsysroot /System/Library/Frameworks/-5185-11ef-9a51-9ab6d782fe32/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.Internal.sdk/System/Library/PrivateFrameworks/ -5185-11ef-9a51-9ab6d782fe32/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.Internal.sdk/System/Library/Frameworks/ -iwithsysroot /usr/local/libressl/include -L/AppleInternal/Library/BuildRoots/e0873e53-5185-11ef-9a51-9ab6d782fe32/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.Internal.sdk/usr/local/libressl/lib -Udarwin24 -Ddarwin24=darwin24 -I. -I/usr/local/include -Wall -g -g -O2 -MT docsis.o -MD -MP -MF .deps/docsis.Tpo -c -o docsis.o docsis.c
clang: error: unknown argument: '-5185-11ef-9a51-9ab6d782fe32/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.Internal.sdk/System/Library/Frameworks/'
make[2]: *** [Makefile:458: docsis.o] Error 1
make[2]: Leaving directory '/Users/user/workspaces/docsis/src'
make[1]: *** [Makefile:492: all-recursive] Error 1
make[1]: Leaving directory '/Users/user/workspaces/docsis'
make: *** [Makefile:387: all] Error 2

@rlaager
Copy link
Owner

rlaager commented Oct 11, 2024

First off, to set expectations... this project is essentially unmaintained. I'm giving it a home on my GitHub, but I haven't used it in years, and never really used it that much.

The issue here is clearly that gcc is treating what is intended to be a path as an argument, because it starts with a dash. Many Unix commands will blow up in the same circumstances. There is a convention, with GNU tools at least, to support -- to end argument parsing. But that only works if the last arguments are non-options (e.g. files).

It's this that's the problem: -iframeworkwithsysroot /System/Library/Frameworks/-5185-11ef-9a51-9ab6d782fe32/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.Internal.sdk/System/Library/PrivateFrameworks/ -5185-11ef-9a51-9ab6d782fe32/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.Internal.sdk/System/Library/Frameworks/ That "iframeworkwithsysroot" feels like something that is Apple proprietary, but I don't know for certain.

I'm not really sure what this project could even do about it. src/Makefile.am is pretty barebones: https://github.com/rlaager/docsis/blob/master/src/Makefile.am

@simonryf
Copy link

The problem arises from the net-snmp-config --cflags which is using the MacOS net-snmp package.

you can check with:

/usr/bin/net-snmp-config --cflags

which generates the gibberish.

I have installed the brew install net-snmp which gives us nice cflags. But it is (and should be) contained within /opt/homebrew/opt/net-snmp/. See:

/opt/homebrew/opt/net-snmp/bin/net-snmp-config --cflags

Now to the part I have no clue and thus did a hacky thing: Tell the autogen to use this bin.

So I modified (right after cloning) the configure.ac net-snmp path by prefixing before $PATH (line 56/57 in configure.ac is now:

AC_PATH_PROG([NETSNMP_CONFIG], [net-snmp-config], [/usr/libexec/net-snmp-config],
                   [/opt/homebrew/opt/net-snmp/bin:$PATH:${prefix}/bin:${exec_prefix}/bin:/opt/net-snmp/bin:/usr/local/bin:/usr/bin])

then do:

./autogen.sh
./configure
make
make install

and you should be good to go.

@rlaager maybe you can help us to do this e bit more elegantly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants