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

Project appears to have drifted out of source-level compatibility with libfirm #2

Open
i336 opened this issue Aug 30, 2015 · 0 comments

Comments

@i336
Copy link

i336 commented Aug 30, 2015

I recently discovered the fluffy language, which seems to me like an interesting side project that was eventually deemed uninteresting and ultimately abandoned. That's kinda sad, but I thought I'd give the language a whirl anyway to see what it was like, even though it's longer maintained.

But I can't get it to build.

Naïvely running make produces

$ make
===> CC adt/strset.c
Package libfirm was not found in the pkg-config search path.
Perhaps you should add the directory containing `libfirm.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libfirm' found
In file included from adt/strset.c:48:0:
adt/hashset.c:97:33: fatal error: libfirm/adt/xmalloc.h: No such file or directory
 #include "libfirm/adt/xmalloc.h"
                                 ^
compilation terminated.
make: *** [build/adt/strset.o] Error 1

Some headscratching later, I copy config.mak.example to config.mak, set FIRM_HOME appropriately, and remove the Q = @ to un-quieten the build. It gets a bit further!

$ make
===> CC adt/strset.c
cc -I. -I/home/i336/libfirm/include -I/home/i336/obstack -I/home/i336/libcore -I/home/i336/libcore/libcore -I/home/i336 -DFIRM_BACKEND -Wall -W -Wextra -Wstrict-prototypes -Wwrite-strings -Wmissing-prototypes -Werror -std=c99 -O0 -g3 -c adt/strset.c -o build/adt/strset.o
===> CC ast.c
cc -I. -I/home/i336/libfirm/include -I/home/i336/obstack -I/home/i336/libcore -I/home/i336/libcore/libcore -I/home/i336 -DFIRM_BACKEND -Wall -W -Wextra -Wstrict-prototypes -Wwrite-strings -Wmissing-prototypes -Werror -std=c99 -O0 -g3 -c ast.c -o build/ast.o
===> CC ast2firm.c
cc -I. -I/home/i336/libfirm/include -I/home/i336/obstack -I/home/i336/libcore -I/home/i336/libcore/libcore -I/home/i336 -DFIRM_BACKEND -Wall -W -Wextra -Wstrict-prototypes -Wwrite-strings -Wmissing-prototypes -Werror -std=c99 -O0 -g3 -c ast2firm.c -o build/ast2firm.o
In file included from /home/i336/libfirm/include/libfirm/ircons.h:299:0,
                 from /home/i336/libfirm/include/libfirm/firm.h:84,
                 from ast2firm.c:6:
/home/i336/libfirm/include/libfirm/irnode.h:21:19: fatal error: nodes.h: No such file or directory
 #include "nodes.h"
                   ^
compilation terminated.
make: *** [build/ast2firm.o] Error 1

Hrm. nodes.h, huh?

~/libfirm$ find -name nodes.h
./scripts/templates/nodes.h
./build/gen/include/libfirm/nodes.h

Okay... let's try rerunning the failing cc invocation, and experimentally add each of those directories to the include path in turn.

Terminal floods with errors

...I'm not pasting the output I got. I will, however, show you what wc -l has to say:

$ cc -I. -I /home/i336/libfirm/scripts/templates/ -I/home/i336/libfirm/include -I/home/i336/obstack -I/home/i336/libcore -I/home/i336/libcore/libcore -I/home/i336 -DFIRM_BACKEND -Wall -W -Wextra -Wstrict-prototypes -Wwrite-strings -Wmissing-prototypes -Werror -std=c99 -O0 -g3 -c ast2firm.c -o build/ast2firm.o 2>&1 | wc -l
753

$ cc -I. -I /home/i336/libfirm/build/gen/include/libfirm/ -I/home/i336/libfirm/include -I/home/i336/obstack -I/home/i336/libcore -I/home/i336/libcore/libcore -I/home/i336 -DFIRM_BACKEND -Wall -W -Wextra -Wstrict-prototypes -Wwrite-strings -Wmissing-prototypes -Werror -std=c99 -O0 -g3 -c ast2firm.c -o build/ast2firm.o 2>&1 | wc -l
161

I tried to make install libfirm next, just in case that was the missing ingredient, but after some consideration I doubt it; that said, libfirm's Makefile's install target is currently broken, so I was unable to test/verify this theory.

For what it's worth, I'm only moderately interested in seeing what this language is like, if purely to see how it works and mess around with for messing-around-with-it's sake. However, fluffy appears to have fallen significantly behind libfirm's metamorphosis and development, to the extent that the two projects are currently not compatible.

If there is no interest in making the necessary changes (a low-priority task) over the long term, perhaps the project homepage might be edited to reflect this fact.

Highlighting the most recent revision of libfirm that is source-compatible with fluffy might be a useful interim alternative.

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

1 participant