Bug 1195297

Summary: amanda-3.3.6-9.fc23 FTBFS: ../perl/Amanda/Xfer.swg:536: Error: Unknown SWIG preprocessor directive: The (if this is a block of target language code, delimit it with %{ and %})
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: amandaAssignee: Petr Hracek <phracek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: fedora, jplesnik, phracek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://koji.fedoraproject.org/koji/taskinfo?taskID=8869752
Whiteboard:
Fixed In Version: amanda-3.3.6-10.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-10 00:54:03 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 Flags
Fix perlcode blocks for SWIG 3.0.3 none

Description Petr Pisar 2015-02-23 14:54:06 UTC
amanda-3.3.6-9.fc23 fails to build in F23:

/usr/lib64/ccache/swig -perl5 -proxy -DSWIG_TYPE_TABLE=SWIG_TYPES_Amanda -I. -o Amanda/Xfer.c ../perl/Amanda/Xfer.swg || { rm -f Amanda/Xfer.c; false; }
/usr/bin/mkdir -p `dirname Amanda/XferServer.c`
/usr/lib64/ccache/swig -perl5 -proxy -DSWIG_TYPE_TABLE=SWIG_TYPES_Amanda -I. -o Amanda/XferServer.c ../perl/Amanda/XferServer.swg || { rm -f Amanda/XferServer.c; false; }
../config.status --file=Amanda/Paths.pm:Amanda/Paths.pm.in
../perl/Amanda/Util.swg:473: Warning 521: Illegal destructor name file_lock::~locked_data(). Ignored.
../config.status --file=Amanda/Constants.pm:Amanda/Constants.pm.in
../perl/Amanda/Xfer.swg:536: Error: Unknown SWIG preprocessor directive: The (if this is a block of target language code, delimit it with %{ and %})
../perl/Amanda/Xfer.swg:537: Error: Unknown SWIG preprocessor directive: just (if this is a block of target language code, delimit it with %{ and %})
../perl/Amanda/Xfer.swg:546: Error: Unknown SWIG preprocessor directive: overload (if this is a block of target language code, delimit it with %{ and %})
[...]

The difference between working and failing build root is:

        swig 	        3.0.2-2.fc22 	> 	3.0.5-1.fc22
        qt-settings     21-2.fc22 	> 	22-1.fc22.1

Comment 1 Jitka Plesnikova 2015-02-26 12:30:48 UTC
Created attachment 995550 [details]
Fix perlcode blocks for SWIG 3.0.3

Comment 2 Jitka Plesnikova 2015-02-26 12:32:41 UTC
The issue is cause due to changes in SWIG 3.0.3

Affected Fedora 21 and higher.


Additional info:
From SWIG documentation 
http://www.swig.org/Doc3.0/SWIGDocumentation.html#Python_nn42

When using %pythoncode and %pythonbegin you generally want to make sure that the block is delimited by %{ and %}. If you delimit it with { and } then any lines with a leading # will be handled by SWIG as preprocessor directives, when you probably meant them as Python comments. Prior to SWIG 3.0.3, invalid preprocessor directives were silently ignored, so generally using the wrong delimiters resulted in such comments not appearing in the generated output (though a comment starting with a valid preprocessor directive could cause problems, for example: # error handling). SWIG 3.0.3 and later report an error for invalid preprocessor directives, so you may have to update existing interface files to delimit blocks of Python code correctly.

%{ and %} should be also used for %perlcode block

Comment 3 Petr Hracek 2015-02-27 12:34:21 UTC
The issue is fixed by upstream (http://sourceforge.net/p/amanda/code/6113/tree/)

I am going to fix it in Fedora 22 too.

Comment 5 Fedora Update System 2015-02-27 14:05:33 UTC
amanda-3.3.6-10.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/amanda-3.3.6-10.fc22

Comment 7 Fedora Update System 2015-02-27 16:05:41 UTC
amanda-3.3.6-6.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/amanda-3.3.6-6.fc21

Comment 8 Fedora Update System 2015-02-27 19:43:45 UTC
Package amanda-3.3.6-10.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing amanda-3.3.6-10.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-2773/amanda-3.3.6-10.fc22
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-03-10 00:54:03 UTC
amanda-3.3.6-6.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2015-03-13 17:24:33 UTC
amanda-3.3.6-10.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.