DragonFlyBSD / DPorts

The dedicated application build system for DragonFly BSD
Other
89 stars 46 forks source link

samba43 fails to compile #171

Closed autumnjolitz closed 8 years ago

autumnjolitz commented 8 years ago
[ 716/3890] Compiling lib/addns/dnsrecord.c
runner cc -pipe -fno-omit-frame-pointer -DLIBICONV_PLUG -g -DLDAP_DEPRECATED -fno-strict-aliasing -DDEVELOPER -DDEBUG_PASSWORD -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -fstack-protector -Wall -Wshadow -Wmissing-prototypes -Wcast-align -Wcast-qual -fno-common -Werror=address -Werror=strict-prototypes -Wstrict-prototypes -Werror=write-strings -Wwrite-strings -Werror-implicit-function-declaration -Werror=pointer-arith -Wpointer-arith -Werror=declaration-after-statement -Wdeclaration-after-statement -Werror=return-type -Wreturn-type -Werror=uninitialized -Wuninitialized -Wformat=2 -Wno-format-y2k -Werror=format -DSTATIC_addns_MODULES=NULL -DSTATIC_addns_MODULES_PROTO=extern void __addns_dummy_module_proto(void) -MD -I/usr/local/include -DLIBICONV_PLUG -Idefault/lib/addns -I../lib/addns -Idefault/include/public -I../include/public -Idefault/source4 -I../source4 -Idefault/lib -I../lib -Idefault/source4/lib -I../source4/lib -Idefault/source4/include -I../source4/include -Idefault/include -I../include -Idefault/lib/replace -I../lib/replace -Idefault -I.. -Idefault/source4/heimdal/lib/krb5 -I../source4/heimdal/lib/krb5 -Idefault/source4/heimdal/lib/asn1 -I../source4/heimdal/lib/asn1 -Idefault/source4/heimdal/include -I../source4/heimdal/include -Idefault/source4/heimdal_build -I../source4/heimdal_build -Idefault/source4/heimdal/lib/gssapi -I../source4/heimdal/lib/gssapi -Idefault/source4/heimdal/lib/roken -I../source4/heimdal/lib/roken -Idefault/source4/heimdal/lib/wind -I../source4/heimdal/lib/wind -Idefault/source4/heimdal/lib/hcrypto/libtommath -I../source4/heimdal/lib/hcrypto/libtommath -Idefault/source4/heimdal/lib/gssapi/gssapi -I../source4/heimdal/lib/gssapi/gssapi -Idefault/source4/heimdal/lib/gssapi/spnego -I../source4/heimdal/lib/gssapi/spnego -Idefault/source4/heimdal/lib/gssapi/krb5 -I../source4/heimdal/lib/gssapi/krb5 -Idefault/source4/heimdal/lib/gssapi/mech -I../source4/heimdal/lib/gssapi/mech -Idefault/libcli/util -I../libcli/util -Idefault/source4/heimdal/base -I../source4/heimdal/base -Idefault/source4/heimdal/lib/hx509 -I../source4/heimdal/lib/hx509 -Idefault/lib/util/charset -I../lib/util/charset -Idefault/source4/heimdal/lib/hcrypto -I../source4/heimdal/lib/hcrypto -Idefault/source4/heimdal/lib -I../source4/heimdal/lib -Idefault/source4/heimdal/lib/com_err -I../source4/heimdal/lib/com_err -Idefault/lib/crypto -I../lib/crypto -Idefault/dynconfig -I../dynconfig -Idefault/librpc -I../librpc -I/usr/local/include -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H=1 -D_GNU_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 ../lib/addns/dnsrecord.c -c -o default/lib/addns/dnsrecord_1.o
In file included from ../lib/replace/system/gssapi.h:47:0,
                 from ../lib/addns/dns.h:31,
                 from ../lib/addns/dnsrecord.c:24:
../source4/heimdal/lib/gssapi/gssapi/gssapi_spnego.h:49:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'
 extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_spnego_mechanism_oid_desc;
 ^
../source4/heimdal/lib/gssapi/gssapi/gssapi_spnego.h:49:8: error: unknown type name 'GSSAPI_LIB_VARIABLE'
 extern GSSAPI_LIB_VARIABLE gss_OID_desc __gss_spnego_mechanism_oid_desc;
        ^
In file included from ../lib/addns/dns.h:45:0,
                 from ../lib/addns/dnsrecord.c:24:
/usr/local/include/talloc.h:49:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
 int talloc_version_major(void);
 ^
Waf: Leaving directory `/usr/obj/dports/net/samba43/samba-4.3.3/bin'
Build failed:  -> task failed (err #1):
        {task: cc dnsrecord.c -> dnsrecord_1.o}
*** Error code 1

Stop.
make[1]: stopped in /usr/dports/net/samba43
*** Error code 1

Stop.
make: stopped in /usr/dports/net/samba43

It looks like Samba is taking some of the system gssapi includes and mixing it with some of it's own gssapi includes via it's include heimdal package.

jrmarino commented 8 years ago

It builds fine in clean environment, e.g. using ports-mgmt/synth or ports-mgmt/poudriere. I highly recommend you try synth (version 0.98_5), which was created specifically because of reports like this. (in other words, reports that something that doesn't build using raw ports which builds fine in clean environement). The idea being that now synth exists, these reports can be discarded.

jrmarino commented 8 years ago

FYI, if the dport exists, it builds officially. There are no dports that don't build. It's the definition. bad ports are actively removed.

autumnjolitz commented 8 years ago

I gave up and installed the pkg version.

Before encountering these issues, I had done a git pull on the /usr/dports directory.

I am uncertain how to better communicate my build environment, other than numerous cyclical dependencies were encountered and that I broke those cycles by installing the binary versions.

I did enable the Experimental modules, FAM support, CUPS support (all features except extended attribute support).

If this experience has taught me anything, it is that there is no existing debugging procedure that I can follow that would accurately allow for bug fixing.

However, existence of this issue on a dragonfly host that is very rarely touched (except to configure openldap) is worrisome. It may indicate an out-of-date install or a partial install, neither which I know how to easily resolve.

jrmarino commented 8 years ago

you've listed several reasons why you should only be using poudriere or synth. The stuff you are describing doesn't happen with those tools.

Either use only pre-built binaries or build everything from src, but mixing the two is a recipe for disaster. Why? Because most people do what you are doing, and only partially update what is needed (without realizing it) and then stuff breaks similarly to what you've described.

Yours is the use case for synth, so if you need ports built with non-standard options, I'd move the synth exclusively.

jrmarino commented 8 years ago

"I am uncertain how to better communicate my build environment, " By the way, that's the point. "your build environment" is unwanted and assumed dirty and corrupt. errors in your build environment are thus discarded. When you can reproduce in a standard environment, such as synth's, then we can compare. Until then, it's a wild goose chase because normally people have messed up their system (again, without realizing it)

jrmarino commented 8 years ago

I should address this too: "I did enable the Experimental modules, FAM support, CUPS support (all features except extended attribute support). If this experience has taught me anything, it is that there is no existing debugging procedure that I can follow that would accurately allow for bug fixing."

1) you should understand that no build testing is done on non-default options. There is no guarantee that a port will build if you change an option 2) there is no run-testing done. Only build testing (and only on default options) 3) there could be cyclic dependencies in theory, but that is not a dports problem, it's a freebsd ports problem.

So there's a bit of assumed risk that comes with using customized options, you should realize and accept that as a price for customizing packages.