Skip to content

Hard-coded gcc #11

Description

@dper

On recent FreeBSD distros, there is no gcc binary. If you install the gcc package, you have binaries like gcc48 and g++48. Or there's the other clang project, which is similar.

I ran across this project when compiling pump.io, which depends on it. What I do to make pump.io is...

env CC=cc CXX=c++ MAKE=gmake npm install

And that works for most of the project dependencies, except not with libusdt. With libusdt, I get the below error message.

gmake: Entering directory '/usr/home/d/src/pump.io/node_modules/bunyan/node_modules/dtrace-provider/build'
  ACTION binding_gyp_libusdt_target_build_libusdt .
Using node: /usr/local/bin/node
Building libusdt for i386
gmake[1]: Entering directory '/usr/home/d/src/pump.io/node_modules/bunyan/node_modules/dtrace-provider/libusdt'
rm -f *.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
gcc -O2 -Wno-error=unknown-pragmas -I/usr/src/sys/cddl/compat/opensolaris -I/usr/src/sys/cddl/contrib/opensolaris/uts/common -m32   -c -o usdt.o usdt.c
gmake[1]: gcc: Command not found
: recipe for target 'usdt.o' failed
gmake[1]: *** [usdt.o] Error 127
gmake[1]: Leaving directory '/usr/home/d/src/pump.io/node_modules/bunyan/node_modules/dtrace-provider/libusdt'

That's the short version, which I think is sufficient. Greater detail can be found at https://dperkins.org/arc/2014-11-12.pump%20on%20freebsd.html.

I can work around the problem by making a symlink from gcc to gcc48, but that's not elegant. It would be better if the environment variable CC worked.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions