Bug 906517
Summary: | Cannot build OpenChange in rawhide - pidl error | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Milan Crha <mcrha> | ||||
Component: | samba | Assignee: | Andreas Schneider <asn> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | abokovoy, asn, gdeschner, jakub, law, sbose, ssorce | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-02-12 05:04:29 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Milan Crha
2013-01-31 18:51:54 UTC
Looks like OpenChange 2.0 broke client/server split? We do not provide Samba 4 AD DC server support in Fedora since work to integrate server side with MIT krb5 still not done. (In reply to comment #1) > Looks like OpenChange 2.0 broke client/server split? Aah, right, I'm sorry, I configure openchange with --prefix only, thus it tries to build with server support on my local build. The more important is the koji build, which breaks in pidl itself. I tried to rebuild openchange 1.0 in rawhide [2], and it fails in the same way, thus it's something either with samba or koji build root. Basically the same package in f18 build root works fine [3]. By the way, there is no direct configure option used to disable server build, neither in the openchange.spec file, it's just that those files are not packaged. [2] http://koji.fedoraproject.org/koji/taskinfo?taskID=4926463 [3] http://koji.fedoraproject.org/koji/taskinfo?taskID=4926525 Compiling exchange.idl /usr/include/stdc-predef.h:0: error: Syntax error near '3' Failed to parse exchange.idl at /usr/bin/pidl line 608. make: *** [exchange.h] Error 255 It looks like an included system header is causing the error: /usr/include/stdc-predef.h Yup, I thought that too, thus I downloaded the latest glibc-headers from koji and checked that particular header content, and it's exactly the same as that I have here locally. Pretty confusing, isn't it? Mine is glibc-headers-2.16-24.fc18.x86_64, the one in koji is glibc-headers-2.17-1.fc19.x86_64 which I downloaded and checked its content. Nonetheless, I opened a ticket in koji [1]. I'll update this when they give any clue or solution for this. [1] https://fedorahosted.org/koji/ticket/254 According to https://lists.fedoraproject.org/pipermail/devel/2013-January/175876.html stdc-predef.h is now automatically included by gcc. In parse_file() in Parse/Pidl/IDL.pm cpp or gcc -E is used to parse a file. Maybe cpp or gcc can somhow tweaked to no include stdc-predef.h? In the worst case with -D_STDC_PREDEF_H=1 ? Nice, thanks for the pointer. I see there that it's known:
> b43-openfwwf-5.2-8.fc18.src.rpm
> ccache-3.1.8-1.fc18.src.rpm
> openchange-1.0-12.fc19.src.rpm
> openttd-opengfx-0.4.5-1.fc19.src.rpm
> samba-4.0.0-171.fc19.rc6.src.rpm
> /usr/include/stdc-predef.h issues
> gcc preprocessor now in C/C++ modes automatically includes
> <stdc-predef.h> header, packages which are using preprocessor
> for non-C/C++ code or doing weird things with the preprocessor
> might run into issues. For non-C/C++ code, it is always better
> to preprocess as assembly instead of C
but I do not know from that what I'm supposed to do; "it is always better to preprocess as assembly instead of C", what does it mean in case of pidl? Will "it" work with other/older GCC compilers too?
You can disable the stdc-predef.h preinclude with -ffreestanding , that option is supported in GCCs from around 1997, but no idea what other compilers support it. Or you can use -P, then the # lineno "filename" etc. lines aren't emitted. Or just make the parser more robust, after all, stdc-predef.h doesn't contain any text after preprocessing, it just contains some comments and macros. To be honest, I'm lost here and I do not understand the core of the issue. For example, I've no idea where the issue is, from the below error log:
> Generating exchange.h
> defined(@array) is deprecated at /usr/share/perl5/vendor_perl/Parse/Pidl/ODL.pm line 73.
> (Maybe you should just omit the defined()?)
> defined(@array) is deprecated at /usr/bin/pidl line 608.
> (Maybe you should just omit the defined()?)
> Compiling exchange.idl
> /usr/include/stdc-predef.h:0: error: Syntax error near '3'
> Failed to parse exchange.idl at /usr/bin/pidl line 608.
> make: *** [exchange.h] Error 255
Should I patch openchange, or samba, or anything else? The error message is too vague for me, and the error itself, "Syntax error near '3'" doesn't make any sense to me, I see only one "3" in the provided stdc-predef.h, and it's inside a comment in the middle of the file, not at line 0.
This is a gcc regression, from my point of view.
I think it would be helpful if you could find out what gcc (or cpp) command line pidl (or whatever) actually invokes and what is the source file it is preprocessing, attach that file here (or is it feeding the source file through stdin into cpp?). Then we can see exactly how cpp preprocessed it. Changing any idl file and calling ./buildtools/bin/waf --verbose should reveal the full command line. Ok, I've built samba, and see it is e.g. calling /usr/bin/cpp -D__PIDL__ -xc /builddir/build/BUILD/samba-4.0.0rc6/librpc/idl/atsvc.idl This preprocesses it into: # 1 "/builddir/build/BUILD/samba-4.0.0rc6/librpc/idl/atsvc.idl" # 1 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 1 "<command-line>" 2 # 1 "/builddir/build/BUILD/samba-4.0.0rc6/librpc/idl/atsvc.idl" followed by (except some minor whitespace changes and comment removal) the original content of atsvc.idl. Guess it chokes on the 3 4 in the stdc-predef.h line, but that is not gcc's fault, you are using a C preprocessor and that is complete valid there, 3 4 means it is a system header that needs to be extern "C" protected for C++ (i.e. isn't implicitly extern "C" protected). So, as I said earlier, if you don't want the # lineno "filename" flags lines at all, preprocess with -P, if you want them, you need to parse them properly. Created attachment 693547 [details] PIDL fix for varying preprocessor line marker Ok, please try this patch against samba. It makes PIDL to accept the line marker format described at http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html Without the patch it fails: http://koji.fedoraproject.org/koji/taskinfo?taskID=4932058 While with the patch it works (though I cannot speak for content): http://koji.fedoraproject.org/koji/taskinfo?taskID=4932066 Please get it in some time soon. Thanks Jakub for the guides and Alexander for the samba patch. Alexander and I just pushed a patchset upstream which fixes the problem. We need to wait till it gets committed by our autobuild system. libtdb-1.2.11-1.fc18, libtalloc-2.0.8-1.fc18, libldb-1.1.15-2.fc18, sssd-1.9.4-3.fc18, samba-4.0.3-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/libtalloc-2.0.8-1.fc18,libtdb-1.2.11-1.fc18,libldb-1.1.15-2.fc18,sssd-1.9.4-3.fc18,samba-4.0.3-1.fc18 Package libtdb-1.2.11-1.fc18, libtalloc-2.0.8-1.fc18, libldb-1.1.15-2.fc18, sssd-1.9.4-3.fc18, samba-4.0.3-1.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing libtdb-1.2.11-1.fc18 libtalloc-2.0.8-1.fc18 libldb-1.1.15-2.fc18 sssd-1.9.4-3.fc18 samba-4.0.3-1.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-2138/libtalloc-2.0.8-1.fc18,libtdb-1.2.11-1.fc18,libldb-1.1.15-2.fc18,sssd-1.9.4-3.fc18,samba-4.0.3-1.fc18 then log in and leave karma (feedback). libtdb-1.2.11-1.fc18, libtalloc-2.0.8-1.fc18, libldb-1.1.15-2.fc18, sssd-1.9.4-3.fc18, samba-4.0.3-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |