Skip to content

fix: use arg line instead of arg value for yaz.cflags in swig exec#14

Merged
adamdickmeiss merged 1 commit into
indexdata:masterfrom
hunkpdev:fix/swig-arg-line
May 13, 2026
Merged

fix: use arg line instead of arg value for yaz.cflags in swig exec#14
adamdickmeiss merged 1 commit into
indexdata:masterfrom
hunkpdev:fix/swig-arg-line

Conversation

@hunkpdev
Copy link
Copy Markdown
Contributor

Summary

In the generate-sources antrun execution, yaz.cflags is passed to swig via <arg value>,
which treats the entire pkg-config --cflags yaz output as a single opaque argument.
On any system where pkg-config returns multiple tokens (e.g. -I/... -DYAZ_POSIX_THREADS=1 -DYAZ_HAVE_XML2=1 ...), swig never receives the -I flag and exits with:

Error: Unable to find 'yaz/zoom.h'

Fix

Change <arg value="${yaz.cflags}"> to <arg line="${yaz.cflags}"> in the swig exec block.
<arg line> splits the value on whitespace and passes each token as a separate argument, which is the correct behaviour for compiler flag strings.

Note

The Windows profile is just as broken ( Lines 376 and 386), but the fix is irrelevant there (unless there is a space in the path).

The Windows profile is just as broken ( Lines 376 and 386), but the fix is irrelevant there (unless there is a space in the path).
@hunkpdev
Copy link
Copy Markdown
Contributor Author

Also it might be the fix to the only open issue: centos 7 build failed,jdk 8

@adamdickmeiss adamdickmeiss self-requested a review May 13, 2026 10:34
Copy link
Copy Markdown
Contributor

@adamdickmeiss adamdickmeiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thx.

@adamdickmeiss adamdickmeiss merged commit 68bdfdd into indexdata:master May 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants