# net/samba41 build fails at smbreadline ?



## unAmygdala (Mar 19, 2014)

I'm going with samba41 from packages at the moment and cannot upgrade it with ports because I keep seeing the following error when trying to build samba41 from ports on FreeBSD10:  


```
../libcli/smbreadline/smbreadline.c:144:20: error: use of undeclared identifier[2037/3933] Compiling source4/lib/registry/tests/generic.c

      'Function'
                rl_event_hook = (Function *)callback;
                                 ^
../libcli/smbreadline/smbreadline.c:144:30: error: expected expression
                rl_event_hook = (Function *)callback;
                                           ^
2 errors generated.
Waf: Leaving directory `/usr/ports/net/samba41/work/samba-4.1.6/bin'
Build failed:  -> task failed (err #1): 
        {task: cc smbreadline.c -> smbreadline_1.o}
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/samba41
*** Error code 1
```

Apparently, folks are benchmarking samba41 performance under FreeBSD . . . so it's building for some.


----------



## trh411 (Mar 22, 2014)

unAmygdala said:
			
		

> ```
> ../libcli/smbreadline/smbreadline.c:144:20: error: use of undeclared identifier[2037/3933] Compiling source4/lib/registry/tests/generic.c
> ```
> Apparently, folks are benchmarking samba41 performance under FreeBSD . . . so it's building for some.


Still having this issue? I just built net/samba41 on FreeBSD10 with no problems. Since your error is showing in devel/libcli, have you tried reinstalling that?


----------



## unAmygdala (Mar 23, 2014)

devel/libcli was not installed.  I installed it but still have the same error as in my first post.


----------



## trh411 (Mar 23, 2014)

Just noticed from 3/21: ports/187806 seems to be related to the issue you are experiencing.


----------



## unAmygdala (Mar 23, 2014)

> In /libcli/smbreadline/smbreadline.c the old function pointer type "Function" of readline is used but readline 6.3 has removed support for that. So changed it to "rl_hook_func_t" if _RL_FUNCTION_TYPEDEF is defined.



Yes, this looks so closely related to what I am experiencing that I doubt it could be anything else.  The patch at the link you posted came out two days ago but it's not been incorporated into the ports tree yet.  It should be trivial to manually change the text in a file if you know how to use grep and/or find to locate the file(s) that need to be changed.  It will also be interesting to see when this patch is incorporated into ports; I'm guessing within a week.


----------

