build: fix and simplify NetSNMP compilation #1608
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First, this reverts changes made in #416 (commit 328ec28). With
lldpd, I don't use
--netsnmp-agent-libs --external-libs
and I neverhad an issue with Ubuntu 14.04. From my understanding, the code to fix
mangle
NETSNMP_LIBS
to fix issues with Fedora is then not neededanymore because the issue appears only because of
--external-libs
,so the code can be removed as well. This was added in #858 (commit
057c279).
Then, this also reverts changes introduced in #1262, notably commit
63fe1f4. Seperating CPPFLAGS from CFLAGS also reorder some flags,
making headers in
/usr/lib/*/perl/*/CORE
used before the ones inlib/
. This happens forparser.h
and leads to this error whenNetSNMP is linked to libperl. This happens with out-of-tree builds
when
-I$(srcdir)/../include -I$(srcdir)/../../lib
is appended toolate.
After investigating a bit, I have a less invasive fix to propose. I'll send another one with this fix. I keep this PR here to maybe have a change to discuss the first change (and check everything passes in Travis).