net-snmp subagent cross compiling

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

net-snmp subagent cross compiling

989 Views
FEI-Namg
Contributor IV

Hi,

I am trying to compile a net-snmp subagent for arm64 but when compiling with aarch64-linux-gnu-gcc, it says that it skips incompatible library since one is arm64 and the other is x86, such as skipping incompatible /usr/lib/x86_64-linux-gnu/libnetsnmpmibs.so when searching for -lnetsnmpmibs

 So I changed how the subagent is being compiled to use arm64 libraries but I am still missing a few libraries such as -lsensors and -lwrap saying they no such file or directory.

If anyone could provide any insight, that would be greatly appreciated

Tags (3)
0 Kudos
Reply
1 Reply

131 Views
yisey
Contributor I

You need to install the ARM64 versions of all required development libraries (e.g., libsnmp-dev:arm64, libsensors4-dev:arm64, libwrap0-dev:arm64) and set the compiler, include paths, and library paths to use them. Ensure PKG_CONFIG_PATH points to ARM64 .pc files and use ./configure --host=aarch64-linux-gnu, or consult a BMW Service Near Me for guidance, so the compiler picks the correct architecture libraries instead of x86_64 ones.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2134469%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Enet-snmp%20subagent%20cross%20compiling%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2134469%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20compile%20a%20net-snmp%20subagent%20for%20arm64%20but%20when%20compiling%20with%20aarch64-linux-gnu-gcc%2C%20it%20says%20that%20it%20skips%20incompatible%20library%20since%20one%20is%20arm64%20and%20the%20other%20is%20x86%2C%20such%20as%20skipping%20incompatible%20%2Fusr%2Flib%2Fx86_64-linux-gnu%2Flibnetsnmpmibs.so%20when%20searching%20for%20-lnetsnmpmibs%3C%2FP%3E%3CP%3E%26nbsp%3BSo%20I%20changed%20how%20the%20subagent%20is%20being%20compiled%20to%20use%20arm64%20libraries%20but%20I%20am%20still%20missing%20a%20few%20libraries%20such%20as%20-lsensors%20and%20-lwrap%20saying%20they%20no%20such%20file%20or%20directory.%3C%2FP%3E%3CP%3EIf%20anyone%20could%20provide%20any%20insight%2C%20that%20would%20be%20greatly%20appreciated%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2265187%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20net-snmp%20subagent%20cross%20compiling%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265187%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYou%20need%20to%20install%20the%20ARM64%20versions%20of%20all%20required%20development%20libraries%20(e.g.%2C%20libsnmp-dev%3Aarm64%2C%20libsensors4-dev%3Aarm64%2C%20libwrap0-dev%3Aarm64)%20and%20set%20the%20compiler%2C%20include%20paths%2C%20and%20library%20paths%20to%20use%20them.%20Ensure%20PKG_CONFIG_PATH%20points%20to%20ARM64%20.pc%20files%20and%20use%20.%2Fconfigure%20--host%3Daarch64-linux-gnu%2C%20or%20consult%20a%20%3CA%20href%3D%22http%3A%2F%2Fautotechnic.us%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EBMW%20Service%20Near%20Me%3C%2FA%3E%20for%20guidance%2C%20so%20the%20compiler%20picks%20the%20correct%20architecture%20libraries%20instead%20of%20x86_64%20ones.%3C%2FP%3E%3C%2FLINGO-BODY%3E