-
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
net-snmp-5.8 build error: ./.libs/libnetsnmpagent.so: undefined reference to `getdtablesize' #155
Comments
gdtablesize is checked in the configure step and HAVE_GETSTABLESIZE is defined (or not, as the case may be). If your library has it, then you could use sysconf(_SC_OPEN_MAX) and in fact, the getdtablesize man page suggest this for portable applications. As a last resort, just wrapping the relevant line with #ifdef HAVE_GETDTABLESIZE/#ENDIF will do the job, but other file descriptors won't get closed. If your version of Linux has /proc/self/fd/ (I'm not sure of how good termux's procfs is) then it will use this value anyway. |
Yes, after googling I have put into |
I have put into |
I'm not sure if I should close this as I'm novice. I've got a workaround, so that's not an issue for me anymore. Please advise. |
Please revert the net-snmp-config.h changes and try the following patch instead:
|
@bvanassche I'm sorry but that says nothing to me. If you give step by step instructions, I would try. |
…lable This patch fixes the Net-SNMP build for termux. See also #155.
The fix has been applied on the V5-9-patches branch and also on the master branch. Please download the latest version of the Net-SNMP source code from either branch and retest. |
Trying to build net-snmp-5.8 in termux enviroment on android 10
Differences of termux envinronment from typical Linux: https://wiki.termux.com/wiki/Differences_from_Linux
I invoke configure with
./configure --prefix=@PREFIX
First, config.guess did not proceed
I have replaced
config.guess
andconfig.sub
with what was in my system in/data/data/com.termux/files/usr/share/automake-1.16
and that fixed the issue.Second,
make all
throwed errors on undeclared identifierushort
and undeclared typeulong
, so I replaced withunsigned short
andunsigned long
(for details see #154 ) and that fixed the issueAnd now, the problem is that
make all
throws an error:error: ./.libs/libnetsnmpagent.so: undefined reference to
getdtablesize'`The error chunk of output:
Please help to fix.
The text was updated successfully, but these errors were encountered: