Export to GitHub

pure-lang - issue #57

pure-sockets: Makefile ignores CPPFLAGS and LDFLAGS


Posted on Apr 28, 2011 by Happy Horse

What steps will reproduce the problem? 1. make all CC=/opt/local/bin/clang CFLAGS="-O2" CPPFLAGS="-I/opt/local/include" CXX=/opt/local/bin/clang++ CXXFLAGS="-O2" LDFLAGS="-L/opt/local/lib"

What is the expected output? What do you see instead? Expected a build without errors and warnings but got:

/opt/local/bin/clang -dynamiclib -O2 sockets.c -o sockets.dylib -lpure sockets.c:16:10: fatal error: 'pure/runtime.h' file not found

include <pure/runtime.h>

     ^

1 error generated. make: [sockets.dylib] Error 1 (ignored)

The error is ignored and make returns with exit status 0; that's also unexpected.

What version of the product are you using? On what operating system? pure 0.47, pure-sockets 0.3, llvm 2.9, clang 2.9, Mac OS X 10.6.7 x86_64

Please provide any additional information below. pure/runtime.h is of course in /opt/local/include, and you see I have -I/opt/local/include in the CPPFLAGS, but the Makefile is ignoring it. The attached patch fixes the Makefile to respect CPPFLAGS, which eliminates the error. It also corrects LD_FLAGS to LDFLAGS as is normal.

Attachments

Comment #1

Posted on Apr 30, 2011 by Massive Panda

Fixed in rev. efc370e97468. Thanks for reporting.

Comment #2

Posted on Apr 30, 2011 by Massive Panda

I also uploaded a new tarball which has the fixed Makefile in it.

Status: Fixed

Labels:
Type-Defect Priority-Medium