Error - FreeBSD 9.0 Won't compile

William Brown william.e.brown at adelaide.edu.au
Thu Jan 26 22:52:45 MST 2012


> 
> 
> In popt_common.h replacing 
> 
> #include <popt.h>
> 
> with
> 
> #include "/usr/local/include/popt.h" 
> 
> Allows it to compile. However this is *not* a solution. I am not sure how to edit the build scripts to fix this, but it would strongly indicate that /usr/local/include on freebsd may not be adding popt.h in this stage. 
> 
> 


Same issue in

[3137/3915] Compiling examples/libsmbclient/testacl.c
../examples/libsmbclient/testacl.c:4:18: error: popt.h: No such file or directory
In file included from ../examples/libsmbclient/testacl.c:6:
../examples/libsmbclient/get_auth_data_fn.h: In function 'get_auth_data_fn':
../examples/libsmbclient/get_auth_data_fn.h:38: error: implicit declaration of function 'fprintf'
../examples/libsmbclient/get_auth_data_fn.h:38: warning: incompatible implicit declaration of built-in function 'fprintf'
../examples/libsmbclient/get_auth_data_fn.h:38: error: 'stdout' undeclared (first use in this function)
../examples/libsmbclient/get_auth_data_fn.h:38: error: (Each undeclared identifier is reported only once
../examples/libsmbclient/get_auth_data_fn.h:38: error: for each function it appears in.)
../examples/libsmbclient/get_auth_data_fn.h:39: error: implicit declaration of function 'fgets'
../examples/libsmbclient/get_auth_data_fn.h:39: error: 'stdin' undeclared (first use in this function)
../examples/libsmbclient/testacl.c: In function 'main':
../examples/libsmbclient/testacl.c:36: error: 'poptContext' undeclared (first use in this function)
../examples/libsmbclient/testacl.c:36: error: expected ';' before 'pc'
../examples/libsmbclient/testacl.c:38: error: array type has incomplete element type
../examples/libsmbclient/testacl.c:40: error: 'POPT_AUTOHELP' undeclared (first use in this function)
../examples/libsmbclient/testacl.c:41: error: expected '}' before '{' token
../examples/libsmbclient/testacl.c:91: error: implicit declaration of function 'setbuf'
../examples/libsmbclient/testacl.c:91: error: 'stdout' undeclared (first use in this function)
../examples/libsmbclient/testacl.c:93: error: 'pc' undeclared (first use in this function)
../examples/libsmbclient/testacl.c:93: error: implicit declaration of function 'poptGetContext'
../examples/libsmbclient/testacl.c:95: error: implicit declaration of function 'poptSetOtherOptionHelp'
../examples/libsmbclient/testacl.c:97: error: implicit declaration of function 'poptGetNextOpt'
../examples/libsmbclient/testacl.c:100: error: implicit declaration of function 'poptGetOptArg'
../examples/libsmbclient/testacl.c:100: warning: passing argument 1 of 'strdup' makes pointer from integer without a cast
../examples/libsmbclient/testacl.c:105: warning: passing argument 1 of 'strdup' makes pointer from integer without a cast
../examples/libsmbclient/testacl.c:110: warning: passing argument 1 of 'strdup' makes pointer from integer without a cast
../examples/libsmbclient/testacl.c:115: warning: passing argument 1 of 'strdup' makes pointer from integer without a cast
../examples/libsmbclient/testacl.c:120: warning: passing argument 1 of 'strdup' makes pointer from integer without a cast
../examples/libsmbclient/testacl.c:125: warning: passing argument 1 of 'strdup' makes pointer from integer without a cast
../examples/libsmbclient/testacl.c:130: warning: passing argument 1 of 'strdup' makes pointer from integer without a cast
../examples/libsmbclient/testacl.c:137: error: implicit declaration of function 'poptPeekArg'
../examples/libsmbclient/testacl.c:138: error: implicit declaration of function 'poptPrintUsage'
../examples/libsmbclient/testacl.c:138: error: 'stderr' undeclared (first use in this function)
../examples/libsmbclient/testacl.c:142: error: implicit declaration of function 'poptGetArg'
../examples/libsmbclient/testacl.c:142: warning: passing argument 2 of 'strcpy' makes pointer from integer without a cast
../examples/libsmbclient/testacl.c:146: error: implicit declaration of function 'printf'
../examples/libsmbclient/testacl.c:146: warning: incompatible implicit declaration of built-in function 'printf'
../examples/libsmbclient/testacl.c:163: warning: incompatible implicit declaration of built-in function 'printf'
../examples/libsmbclient/testacl.c:176: warning: incompatible implicit declaration of built-in function 'printf'
../examples/libsmbclient/testacl.c:211: error: implicit declaration of function 'perror'
../examples/libsmbclient/testacl.c:231: error: implicit declaration of function 'snprintf'
../examples/libsmbclient/testacl.c:231: warning: incompatible implicit declaration of built-in function 'snprintf'
../examples/libsmbclient/testacl.c:38: warning: unused variable 'long_options'
Waf: Leaving directory `/root/samba-master/bin'
Build failed:  -> task failed (err #1): 
	{task: cc testacl.c -> testacl_3.o}
*** Error code 1

Stop in /root/samba-master.

Sincerely,

William Brown

Research & Teaching, Technology Services
The University of Adelaide, AUSTRALIA 5005

CRICOS Provider Number 00123M
-----------------------------------------------------------------------------
IMPORTANT: This message may contain confidential or legally privileged
information. If you think it was sent to you by mistake, please delete all
copies and advise the sender. For the purposes of the SPAM Act 2003, this
email is authorised by The University of Adelaide.

pgp.mit.edu
http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x3C0AC6DAB2F928A2




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120127/8ff4405d/attachment.pgp>


More information about the samba-technical mailing list