-
Notifications
You must be signed in to change notification settings - Fork 529
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
Fix sed incompatibilities on MacOS X #632
Comments
Comment out dead code in scan.l Refs: westes#632
c674b5f fixes items 1 and 2 for the main make target.
The simple solution is to install gnu-sed with Homebrew and add it to my path. Did that, which exposed weirdness in the C99 code generation. Looks like it emits the typename |
Saw a note that @szhorvat, who got me started on this, was using Mac Ports instead of Homebrew. I'll check that, too. So far the only changes/additions I've needed to the pre-req list in INSTALL.md are:
|
Notes on the The fix for this should be in one of the M4_xxx_HOOK lines of the src/lang-flex.skl files right now. (Git anthropologists should note that I'm working on an M4-free code emission backend so this will change.) |
tests/prefix_c99.l calls a function before its definition from within a dead code block. This is treated as an error in newer compilers. The test isn't needed as the scanner's main() repeats the call. Refs: westes#632
Expanding Found out I've been building everything with the Xcode CLI bison, which is v2.3. This breaks the bison tests. Adding the Homebrew bison v3.8.2 to PATH fixes the bison tests. One last test included an implicit function call in its user actions. The call was tested later in the main function, so I commented it out. Tests all build and pass, now. |
Alright, got a successful |
Sorry, I deleted my comment. I'll check if everything is fine with MacPorts once you're done with Homebrew. So far the only difficulty was that it installs GNU sed as |
Clarify and expand tool dependency info in INSTALL.md, particularly with respect to GNU tool variants. Describe minimal troubleshooting steps for failed builds on non-Debian systems. Refs: westes#632
MacPorts and Homebrew package schemes are are looking pretty similar. I've updated INSTALL.md and will send a PR in a moment. I'm leaving a couple of notes here that I expect to age quickly although they are correct now.
|
I lost track of what was happening here. Is everything supposed to work now with the new instructions? I just tried this, working with MacPorts, not Homebrew. MacPorts installs GNU sed as
Notice that it tries to use |
Clarification: The |
Now that I can build the development version of flex, I tried to use it to build igraph, and it seems it's generating syntactically incorrect C files when using /* Generate the code to find the start state. */
yy_current_state", "yy_start_state_list[yyg->yy_start + yyatbol()];
yy_match:
/* Generate the code to find the next match. */ The flex sources are at https://github.com/igraph/igraph/blob/master/src/io/pajek-lexer.l |
Received a report of mis-generated headers from HEAD on macos. Tested on macos 14.4 with a mixed Homebrew-GNU/Xcode toolchain and found two problems.
Homebrew installs the Xcode Command Line Tools which include BSD versions of m4, sed, etc. Flex uses a few GNU extensions, to sed in particular, that break the script src/mkskel.sh.
Homebrew's GCC for macos 14 enforces -Werror=implicit-function-declaration. This is fine except it trips on a block of dead code in src/scan.l near lines 676-681.
The requirements list in INSTALL.md could give a better hint on how to avoid these problems.
I plan to fix the items 1 & 2 in one PR and item 3 in another (once I know how I did the first two).
The text was updated successfully, but these errors were encountered: