make -j1 CC=clang++ O=0 test-unit
...
test/mcmc/unit_e_metric --gtest_output="xml:test/mcmc/unit_e_metric.xml";
Running main() from gtest_main.cc
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from McmcUnitEMetric
[ RUN ] McmcUnitEMetric.sample_p
[ OK ] McmcUnitEMetric.sample_p (2 ms)
[----------] 1 test from McmcUnitEMetric (2 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (2 ms total)
[ PASSED ] 1 test.
clang++ -I src -I lib/eigen_3.1.3 -I lib/boost_1.53.0 -Wall -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -Wno-unused-function -Wno-uninitialized -Wno-c++11-long-long -c -O0 -DGTEST_USE_OWN_TR1_TUPLE -DGTEST_HAS_PTHREAD=0 -Wno-c++11-long-long -I lib/gtest_1.6.0/include -I lib/gtest_1.6.0 src/test/mcmc/base_hmc_test.cpp -o test/mcmc/base_hmc.o
g++ src/test/mcmc/models/improper.cpp -Lbin -lstan -o src/test/mcmc/models/improper
src/test/mcmc/models/improper.cpp:3:39: fatal error: stan/model/model_header.hpp: No such file or directory
#include <stan/model/model_header.hpp>
^
compilation terminated.
make: *** [src/test/mcmc/models/improper] Error 1
Ben
--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Thanks. Can you see what artifacts you have laying around? I'm interested in:src/test/mcmc/models/improper*
And their timestamps. I need to find a way to recreate this issue consistently, but I haven't.
goodrich@CYBERPOWERPC:/opt/stan$ ls -l -h src/test/mcmc/models/improper*
-rwxr-xr-x 1 goodrich goodrich 3.0M Jun 26 01:32 src/test/mcmc/models/improper
-rw-r--r-- 1 goodrich goodrich 8.0K Jun 26 08:11 src/test/mcmc/models/improper.cpp
-rw-r--r-- 1 goodrich goodrich 58 Jun 6 21:25 src/test/mcmc/models/improper.stan
make -d -j1 CC=clang++ O=0 test-unit
...
No need to remake target `src/test/mcmc/models/improper.stan'.
Pruning file `src/stan/model/model_header.hpp'.
Pruning file `bin/stanc'.
Finished prerequisites of target file `src/test/mcmc/models/improper.cpp'.
Prerequisite `src/test/mcmc/models/improper.stan' is older than target `src/test/mcmc/models/improper.cpp'.
Prerequisite `src/stan/model/model_header.hpp' is older than target `src/test/mcmc/models/improper.cpp'.
Prerequisite `bin/stanc' is older than target `src/test/mcmc/models/improper.cpp'.
No need to remake target `src/test/mcmc/models/improper.cpp'.
Finished prerequisites of target file `src/test/mcmc/models/improper'.
Prerequisite `src/test/mcmc/models/improper.cpp' is newer than target `src/test/mcmc/models/improper'.
Must remake target `src/test/mcmc/models/improper'.
Invoking builtin recipe to update target `src/test/mcmc/models/improper'.
g++ src/test/mcmc/models/improper.cpp -Lbin -lstan -o src/test/mcmc/models/improper
Putting child 0x69dcb30 (src/test/mcmc/models/improper) PID 23510 on the chain.
Live child 0x69dcb30 (src/test/mcmc/models/improper) PID 23510
Reaping losing child 0x69dcb30 PID 23510
Removing child 0x69dcb30 PID 23510 from chain.
Ben and Marcus, I just submitted a pull request that should fix the issue. Could one of you review this pull request?
https://github.com/stan-dev/stan/pull/140
For the makefile sent, replace
%$(EXE): %.o
with
$(patsubst %.stan,%,$(wildcard $(addsuffix .stan,$(MAKECMDGOALS)))) : %$(EXE): %.o
That should make it work. That's a static pattern rule. I've taken the goals, added .stan to the goals, searched for file existence, then stripped the .stan off. Those are the targets we are interested in.
goodrich@CYBERPOWERPC:/opt/stan$ git branch | grep -F "*"
* feature/makefile_issue
make -j1 CC=clang++ O=0 test-unit
clang++ -I src -I lib/eigen_3.1.3 -I lib/boost_1.53.0 -Wall -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -Wno-unused-function -Wno-uninitialized -Wno-c++11-long-long -c -O0 -DGTEST_USE_OWN_TR1_TUPLE -DGTEST_HAS_PTHREAD=0 -Wno-c++11-long-long -I lib/gtest_1.6.0/include -I lib/gtest_1.6.0 src/test/mcmc/base_hmc_test.cpp -o test/mcmc/base_hmc.o
g++ src/test/mcmc/models/improper.cpp -Lbin -lstan -o src/test/mcmc/models/improper
src/test/mcmc/models/improper.cpp:3:39: fatal error: stan/model/model_header.hpp: No such file or directory
#include <stan/model/model_header.hpp>
^
compilation terminated.
make: *** [src/test/mcmc/models/improper] Error 1
Ben, just to isolate, can you run:
make src/test/mcmc/models/improper?
Can you also show the time stamps and files?
$ ls -l -h src/test/mcmc/models/improper*
goodrich@CYBERPOWERPC:/opt/stan$ ls -l -h src/test/mcmc/models/improper*
-rwxr-xr-x 1 goodrich goodrich 3.0M Jun 27 18:02 src/test/mcmc/models/improper
-rw-r--r-- 1 goodrich goodrich 8.0K Jun 27 17:02 src/test/mcmc/models/improper.cpp
-rw-r--r-- 1 goodrich goodrich 76K Jun 27 18:02 src/test/mcmc/models/improper.d
-rw-r--r-- 1 goodrich goodrich 6.7M Jun 27 18:02 src/test/mcmc/models/improper.o
-rw-r--r-- 1 goodrich goodrich 58 Jun 6 21:25 src/test/mcmc/models/improper.stan
clang++ -I src -I lib/eigen_3.1.3 -I lib/boost_1.53.0 -Wall -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -Wno-unused-function -Wno-uninitialized -Wno-c++11-long-long -c -O0 -DGTEST_USE_OWN_TR1_TUPLE -DGTEST_HAS_PTHREAD=0 -Wno-c++11-long-long -I lib/gtest_1.6.0/include -I lib/gtest_1.6.0 src/test/gm/command_test.cpp -o test/gm/command.o
clang++ src/test/gm/model_specs/compiled/domain_fail.o -Lbin -lstan -o src/test/gm/model_specs/compiled/domain_fail
g++ src/test/gm/model_specs/compiled/value_fail.cpp -Lbin -lstan -o src/test/gm/model_specs/compiled/value_fail
goodrich@CYBERPOWERPC:/opt/stan$ ls -l -h src/test/gm/model_specs/compiled/value_fail.*
-rw-r--r-- 1 goodrich goodrich 8.0K Jun 27 17:02 src/test/gm/model_specs/compiled/value_fail.cpp
-rw-r--r-- 1 goodrich goodrich 7 Jun 6 21:25 src/test/gm/model_specs/compiled/value_fail.init.R
-rw-r--r-- 1 goodrich goodrich 60 Jun 6 21:25 src/test/gm/model_specs/compiled/value_fail.stan