jzimmerman / langcc

langcc: A Next-Generation Compiler Compiler
https://langcc.io
Apache License 2.0
1.73k stars 58 forks source link

Requires 2 package managers on Mac / Hardcoded compiler flags #3

Closed snej closed 2 years ago

snej commented 2 years ago

From the discussion on lobste.rs, by user alec:

By default it needs both Homebrew and Ports on Mac. I’m not going to install Ports just to get libcrypto++, so I manually installed it in /usr/local, but after adding the install path to the CFLAGS/LFLAGS in the root Makefile it still failed to find libcrypto at a later stage. It turns out the compiler arguments are hard-coded into the source code.

jzimmerman commented 2 years ago

This is not as straightforward as it might seem; dependencies have to be hard-coded into the source code, because langcc generates (and compiles) C++ from C++ itself.

However, what I have done instead is to replace libcrypto++ entirely, instead opting for a small header-only library that can be easily inlined into langcc_util.hpp, and thereby be available both to langcc and to the code that langcc generates. That should fix the issue (no more dependency on MacPorts).