compilation error during installation because of #include "folly/..."

185 views
Skip to first unread message

Jeremy Murphy

unread,
Aug 4, 2013, 5:03:01 AM8/4/13
to faceboo...@googlegroups.com
Hi there,

I'm just wondering why the folly code includes its local headers as "folly/Header.h" instead of just "Header.h"?  It seems to assume (and enforce) that compilation will take place in the parent directory, right?  I hit this because I'm doing an out-of-tree compile, as I normally do, and it fails because it can't find the folly headers.  This is the output:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/home/jeremy/projects/folly/folly -I..//home/jeremy/projects/folly/folly -I/home/jeremy/projects/folly/folly/io -I/home/jeremy/projects/folly/folly/test -lstdc++ -std=gnu++0x -pthread -I/usr/include -I/usr/include/double-conversion -lboost_thread-mt -lboost_system -march=native -O2 -pipe -MT Random.lo -MD -MP -MF .deps/Random.Tpo -c /home/jeremy/projects/folly/folly/Random.cpp  -fPIC -DPIC -o .libs/Random.o
/home/jeremy/projects/folly/folly/Random.cpp:17:26: fatal error: folly/Random.h: No such file or directory

So you can see that configure is pulling in "/home/jeremy/projects/folly/folly"--the location of configure and the source--as an include directory, but because the source code includes "folly/Header.h" it actually needs to include the parent directory even though that directory is of no real consequence.  Seems a bit weird.

What do you think?

Jeremy

Marcelo Juchem

unread,
Aug 7, 2013, 4:24:41 PM8/7/13
to faceboo...@googlegroups.com
Try replacing all those "-I/home/jeremy/projects/folly/folly -I..//home/jeremy/projects/folly/folly -I/home/jeremy/projects/folly/folly/io -I/home/jeremy/projects/folly/folly/test" with only the root directory of folly: -I/home/jeremy/projects/folly

- marcelo
Reply all
Reply to author
Forward
0 new messages