make problems: netmrg.cpp:29: getopt.h: No such file or dire


02-08-2003 18:12:39

Hello, I get the following error when doing a make, on FreeBSD 4.8-STABLE

bash-2.05b$ make
Making all in src
source='netmrg.cpp' object='netmrg.o' libtool=no depfile='.deps/netmrg.Po' tmpdepfile='.deps/netmrg.TPo' depmode=gcc /usr/local/bin/bash ./../depcomp g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I/usr/include/libxml2 -I/usr/local/include/mysql -I/usr/include/libxml2 -I/usr/local/include/ucd-snmp -g -O2 -c -o netmrg.o `test -f 'netmrg.cpp' || echo './'`netmrg.cpp
netmrg.cpp29 getopt.h No such file or directory
*** Error code 1

Stop in /home/ken/public_html/netmrg-0.10pre1/src.
*** Error code 1

Stop in /home/ken/public_html/netmrg-0.10pre1.




02-08-2003 20:51:11


Try removing the following line from [b60257c91be]netmrg.cpp[/b60257c91be]
[code160257c91be]#include <getopt.h>[/code160257c91be]

From the little research that I've done, FreeBSD's [b60257c91be]getopt[/b60257c91be] function is defined in [b60257c91be]unistd.h[/b60257c91be] which is already included. Removing the line should, hopefully, allow you to compile successfully.

I've started a bug for this issue. In the future, our configure scripts should be able to handle this by themselves. To check the progress of this bug visit http//

Thank you for bringing this to our attention. Please tell us if this change is successful, or if you have further problems.


02-08-2003 21:21:57

That got me a little further along, libxml is installed in /usr/local/ when built from the freebsd ports, so I got that taken care of. However now I need to tell configure where iconv.h is , so i will try that and let you know how I fare.



05-08-2003 15:55:50


In file included from /usr/local/include/libxml2/libxml/parser.h655,
from /usr/local/include/libxml2/libxml/globals.h16,
from /usr/local/include/libxml2/libxml/threads.h31,
from /usr/local/include/libxml2/libxml/xmlmemory.h186,
from settings.cpp10
/usr/local/include/libxml2/libxml/encoding.h27 iconv.h No such file or directory

here is the error I get now,

It looks like inconv is

however when I configure with the following, it doesnt seem to fix the error, any ideas?

-bash-2.05b$ ./configure --with-mysql-lib-dir=/usr/local/lib/mysql --with-mysql-include-dir=/usr/local/include/mysql --with-xml2-include-dir=/usr/local/include/libxml2 --with-xml2-lib-dir=/usr/local/lib/libxml2 --includedir=/usr/local/include

Once again, system is 4.8-STABLE FreeBSD


06-08-2003 20:57:48


Unfortunately we didn't really have access to a FreeBSD box for devel testing. I believe silfreed is installing FreeBSD on a test box so that we can resolve any additional problems we find.

The includedir specifies where the installer should put header files. Please try the following to get make to see your iconv.h file

[code16f47ca30ff]./configure <OTHER OPTIONS> CPPFLAGS="-I/usr/local/include"[/code16f47ca30ff]

You may get some warnings when running make, but you should be able to ignore them.


06-08-2003 21:32:34

Ok I will try that, let me know if you want an account on a machine to test.