-
Notifications
You must be signed in to change notification settings - Fork 21
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
[WIP] - perl packages for devShell.networkSub to run switch_config_loader #804
base: master
Are you sure you want to change the base?
Conversation
Required perl lib for running switch-configurations/config/scripts/switch_config_loader
Required lib for switch-configuration/config/scripts/switch_config_loader
Include all of the perl libs required for running switch-configuration/config/scripts/switch_config_loader in the devShell.
Latest version of perlNetInterface and includes the necessary workaround for the build failure with newer linux kernels: https://rt.cpan.org/Public/Bug/Display.html?id=124582
Without `which` the resulting error happens at build time: ... checking for LOCAL_SIZEOF_SOCKADDR_OSITP... not defined configure: creating ./config.status config.status: creating config.h Can't exec "which": No such file or directory at inst/netsymbols.pl line 55 (#1) (W exec) A system(), exec(), or piped open call could not execute the named program for the indicated reason. Typical reasons include: the permissions were wrong on the file, the file wasn't found in $ENV{PATH}, the executable in question was compiled for another architecture, or the #! line in a script points to an interpreter that can't be run for similar reasons. (Or maybe your system doesn't support #! at all.) Use of uninitialized value $grep in pattern match (m//) at inst/netsymbols.pl line 56 (#1) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl will try to tell you the name of the variable (if any) that was undefined. In some cases it cannot do this, so it also tells you what operation you used the undefined value in. Note, however, that perl optimizes your program and the operation displayed in the warning may not necessarily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer to the concatenation (.) operator, even though there is no . in your program. Use of uninitialized value $grep in concatenation (.) or string at inst/netsymbols.pl line 60 (#1) sh: illegal option -r sh: illegal option -r sh: illegal option -r Uncaught exception from user code: AF_INET not found in netsymbolsC.inc, prerequisite development library header files missing from /usr/include/sys
@djacu Im currently having an issue with building Heres the error Im getting when going from 1.015->1.016. Let me know if you (or anyone else for that matter) have any ideas:
|
cp -pr ${linuxHeaders}/include usr/ | ||
ln -s ${linuxHeaders}/include/linux/socket.h usr/include/sys/socket.h | ||
ls -lahR usr/ | ||
echo "aaaaaaaa" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are seen
You are heard
Your feelings are valid.
I tried some things that did not pan out. @ConnorBaker is coming over to hack in a bit. He might have some good ideas. |
Creating our own NetPing package to incorporate an existing patch (thanks Owen) that has yet to land upstream.
This is required for a subset of functionality in Loader.pm for switch-configurations.
@sarcasticadmin I have been digging around and I'm not seeing |
@djacu good catch, I should have actually looked at the contents of
Seems worth a shot, Im assuming you patched out the following: https://metacpan.org/release/MIKER/Net-Interface-1.016/source/Makefile.PL#L179-183 Feel free to push up what you've got too. Im going to ping @owendelong and see if I can confirm which version hes using and on what platforms. Seems like this would fail for him on various versions of modern linux. |
The make file has a check to grep for the AF_INET symbol in /usr/include/sys. Patching this out so that it builds. Not certain if this will cause runtime failures.
Yeah that is what I patched out. Cleaned up the derivation definition and pushed up what I got. I tried to enable the tests but they failed and I couldn't figure out in a short amount of time how to disable only the broken tests. It builds now but still not sure if it actually works at runtime. |
Description of PR
Fixes: #801
This requires all of the perl libs to be able to run
switch_config_loader
from inside the devShell.networkSubPrevious Behavior
New Behavior
Tests