-
Notifications
You must be signed in to change notification settings - Fork 210
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
An error can be observed during parallel compilation of net-snmp. #283
Comments
when use make -j32, perl/Makefile in Makefile.in should dependecy subdirs:
Otherwise, make test will occur an error.
when i add this dependecy, make test will work well.
I also observed some libraries(-lnetsnmpmibs -lnetsnmpagent ) are not linked in NetSNMP/agent/agent.so, when make test failed # make test success
gcc -shared -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/openEuler/openEuler-hardened-ld -L/usr/local/lib -fstack-protector-strong -Wl,-z,relro -Wl,-z,now agent.o -o ../blib/arch/auto/NetSNMP/agent/agent.so \
-L/usr/lib64 -L/home/abuild/rpmbuild/BUILD/net-snmp-5.8/snmplib/.libs -L/home/abuild/rpmbuild/BUILD/net-snmp-5.8/snmplib -L/home/abuild/rpmbuild/BUILD/net-snmp-5.8/agent/.libs -L/home/abuild/rpmbuild/BUILD/net-snmp-5.8/agent -lnetsnmpmibs -lnetsnmpagent -lnetsnmp -lperl \
#make test failed
gcc -shared -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/openEuler/openEuler-hardened-ld -L/usr/local/lib -fstack-protector-strong -Wl,-z,relro -Wl,-z,now agent.o -o ../blib/arch/auto/NetSNMP/agent/agent.so \
-L/usr/lib64 -L/home/abuild/rpmbuild/BUILD/net-snmp-5.8/snmplib/.libs -L/home/abuild/rpmbuild/BUILD/net-snmp-5.8/snmplib -L/home/abuild/rpmbuild/BUILD/net-snmp-5.8/agent/.libs -L/home/abuild/rpmbuild/BUILD/net-snmp-5.8/agent -lnetsnmp -lperl \ |
Thank you for the detailed report. Parallel compilation should have been fixed by commit 855e1c2. |
I'm not sure if there are other errors in parallel compilation. |
I'd like to get parallel compilation working. I just noticed that an additional dependency is required to fix parallel compilation. See also commit 9ea3d8b. |
Hi @bvanassche libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} $(USELIBS)
$(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@
$(RANLIB) $(AGENTLIB)
libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS)
$(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@
$(RANLIB) $(MIBLIB) Does libnetsnmpagent should depend on subdirs? |
I think so. Please take a look at commit 3d09c66. |
I have removed commit 3d09c66 because it introduced a circular dependency. |
@bvanassche sorry, I check agent/Makefile.in again, I think libnetsnmpagent should not depend on subdirs, what's your opinion?
|
I have tried the following patch:
but with that patch error messages similar to the following appear (every attempt results in a different error message):
Does the above indicate that a dependency mibgroup/* dependency is missing from libnetsnmpagent? |
yes, I think so. I encounter the same error. when I revert this patch, the error disappears. |
Why does mibgroup add to the subdirs? Agent/Makefile.in will compile the c file in mibgroup directory, so I recommend deleting mibgroup in subdirs.
|
the patch is as follow:
|
The above patch has been applied on the v5.9 and master branches. Thanks for the patch! |
when i use make -j32 to compile net-snmp,Sometimes the following errors occur:
This error will not occur when I add the following dependency in agent/Makefile.in:
The text was updated successfully, but these errors were encountered: