Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.0 seems to break some packages with arg splitting #23

Closed
thesamesam opened this issue May 23, 2023 · 3 comments
Closed

1.2.0 seems to break some packages with arg splitting #23

thesamesam opened this issue May 23, 2023 · 3 comments

Comments

@thesamesam
Copy link

We had a report in Gentoo at https://bugs.gentoo.org/906892 of http-parser-1.2.3 failing to build with ffi-compiler-1.2.0 like so:

mkdir -p x86_64-linux/http-parser
x86_64-pc-linux-gnu-gcc -O2 -pipe -march\=native -fno-diagnostics-color -Wall\ -Wextra\ -O3 -fPIC -o x86_64-linux/http-parser/http_parser.o -c ./http-parser/http_parser.c
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option -Wall -Wextra -O3
rake aborted!
Command failed with status (1): [x86_64-pc-linux-gnu-gcc -O2 -pipe -march\=...]

@matoro points out that the args from https://github.com/cotag/http-parser/blob/master/ext/Rakefile#L4 (the package itself) seem to not be split by ffi-compiler.

See also #22.

@matoro
Copy link
Contributor

matoro commented May 23, 2023

Note that in this case the environment flags (-O2 -pipe -march\=native -fno-diagnostics-color) ARE split correctly, it is just the flags set by the package itself that are not.

@davispuh
Copy link
Collaborator

Yeah ehhh, turns out 5e173ae changed API and thus each flag should be a separate item rather putting everything in same string. ie. t.cflags << "-Wall" << "-Wextra" << "-O3" and that would work fine. But there's probably a lot of applications that do this so I restored API compatibility in #24

Also this library has 0 tests so 😅

@davispuh
Copy link
Collaborator

davispuh commented Jun 8, 2023

Just merged #24 and tagged 1.2.1 https://github.com/ffi/ffi-compiler/releases/tag/1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants