Undefined symbol fmemopen when compiling on OpenIndiana

Jeremy Allison jra at samba.org
Wed Mar 20 15:50:15 UTC 2019


On Wed, Mar 20, 2019 at 10:27:23AM +0100, Rouven WEILER via samba-technical wrote:
> Compiling samba-4.10.0 on OpenIndiana/Illumos I get the following shortened output when compiling verbose (whole output see below):
> 
> [3167/3865] Linking bin/default/libcli/dns/resolvconftest
> Undefined                       first referenced
>  symbol                             in file
> fmemopen                            libcli/dns/resolvconftest.c.3.o
> ld: fatal: symbol referencing errors. No output written to /samba/build/samba/bin/default/libcli/dns/resolvconftest
> collect2: error: ld returned 1 exit status
> 
> Waf: Leaving directory `/export/home/github.com/oi-userland.git/components/network/samba/build/samba/bin/default'
> Build failed
>  -> task in 'resolvconftest' failed with exit status 1:
>         {task 4233998772L: cprogram resolvconftest.c.3.o -> resolvconftest}
> 
> 
> Maybe this helps: As far as I know there is no fmemopen function on OpenIndiana as well as on Oracle Solaris.

Yeah, they left POSIX a long time ago, probably
due to neglect it seems :-(.

https://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html

As it's only in test code and it's the only use
of this function left in our code you could
fix the build to not build the target 'resolvconftest'
be editing it out of libcli/dns/wscript_build.

We did use this elsewhere but replaced it (I
remember Volker fixed this). I'll have to look
back in the git logs to see how he did it.



More information about the samba-technical mailing list