Smoke Doesn’t Compile In Linux
Posted: 14 April 2008 02:12 AM   [ Ignore ]
New Member
Avatar
Rank
Total Posts:  87
Joined  2008-01-16

Everything else compiles fine. This is what I get:

Scanning dependencies of target smoke
[ 2%] Building CXX object demos/smoke/CMakeFiles/smoke.dir/fluid2d.o
[ 5%] Building CXX object demos/smoke/CMakeFiles/smoke.dir/glutApplication.o
/usr/src/multitouch/demos/smoke/glutApplication.cc: In member function ‘virtual void glutApplication::CallBackKeyboardFunc(unsigned char, int, int)’:
/usr/src/multitouch/demos/smoke/glutApplication.cc:74: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/glutApplication.cc:74: warning: deprecated conversion from string constant to ‘char*’
[ 8%] Building CXX object demos/smoke/CMakeFiles/smoke.dir/glutMaster.o
/usr/src/multitouch/demos/smoke/glutMaster.cc: In constructor ‘GlutMaster::GlutMaster()’:
/usr/src/multitouch/demos/smoke/glutMaster.cc:27: warning: deprecated conversion from string constant to ‘char*’
[ 11%] Building CXX object demos/smoke/CMakeFiles/smoke.dir/glutWindow.o
[ 14%] Building CXX object demos/smoke/CMakeFiles/smoke.dir/main.o
/usr/src/multitouch/demos/smoke/main.cc: In function ‘int main(int, char**)’:
/usr/src/multitouch/demos/smoke/main.cc:34: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:34: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:39: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:39: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:40: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:40: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:42: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:42: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:52: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:53: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:53: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:60: warning: deprecated conversion from string constant to ‘char*’
make[2]: *** No rule to make target `/usr/local/lib/libfftw.a’, needed by `demos/smoke/smoke’.  Stop.
make[1]: *** [demos/smoke/CMakeFiles/smoke.dir/all] Error 2
make: *** [all] Error 2

I’ve reinstalled fftw-2.1.5 and the dev. It’s late and I can’t make my eyes stop from blurring. I’m obviously missing an include or something. *yawn* Let me know if anything jumps out as a solution. Thanks. wink

 Signature 

EasterIsland, LLC.
My Signature Quote

Profile
 
 
Posted: 14 April 2008 04:17 AM   [ Ignore ]   [ # 1 ]
Jr. Member
Avatar
RankRank
Total Posts:  101
Joined  2008-03-02

Where do you have your fftw includes and libs, are they in /usr/local or ?

Profile
 
 
Posted: 14 April 2008 01:23 PM   [ Ignore ]   [ # 2 ]
New Member
Avatar
Rank
Total Posts:  87
Joined  2008-01-16

I use the YaST installer. /usr/local/include
Plus, I can change it using “ccmake .” and manually changing it.  I just don’t understand which path isn’t being included where.

 Signature 

EasterIsland, LLC.
My Signature Quote

Profile
 
 
Posted: 14 April 2008 05:35 PM   [ Ignore ]   [ # 3 ]
Jr. Member
Avatar
RankRank
Total Posts:  101
Joined  2008-03-02

Did you test if there is libfftw.a under /usr/local/lib ?
I had similar errors with dependencies, it could be
for example that you have libfftw2.a or somthing
in wich case you would just put a simlink to it.
(this is shoot in the dark)

Profile
 
 
Posted: 14 April 2008 09:12 PM   [ Ignore ]   [ # 4 ]
New Member
Avatar
Rank
Total Posts:  87
Joined  2008-01-16

Okay, now this is starting to piss me off. WTF?

Linking CXX executable smoke
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_c2real_aux_howmany’:
rfftwnd.c:(.text+0x9e): undefined reference to `fftw’
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_real2c_aux_howmany’:
rfftwnd.c:(.text+0x46e): undefined reference to `fftw’
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_c2real_aux’:
rfftwnd.c:(.text+0x65b): undefined reference to `fftw’
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_complex_to_real’:
rfftwnd.c:(.text+0x823): undefined reference to `fftw_die’
rfftwnd.c:(.text+0x943): undefined reference to `fftw_malloc’
rfftwnd.c:(.text+0xa54): undefined reference to `fftw_malloc’
rfftwnd.c:(.text+0xaf5): undefined reference to `fftw_die’
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_real2c_aux’:
rfftwnd.c:(.text+0xcb1): undefined reference to `fftw’
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_real_to_complex’:
rfftwnd.c:(.text+0xe13): undefined reference to `fftw_die’
rfftwnd.c:(.text+0xf3a): undefined reference to `fftw_malloc’
rfftwnd.c:(.text+0x1044): undefined reference to `fftw_malloc’
rfftwnd.c:(.text+0x10e5): undefined reference to `fftw_die’
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_create_plan_specific’:
rfftwnd.c:(.text+0x11c1): undefined reference to `fftwnd_create_plan_aux’
rfftwnd.c:(.text+0x125d): undefined reference to `fftwnd_new_plan_array’
rfftwnd.c:(.text+0x1330): undefined reference to `fftwnd_create_plans_specific’
rfftwnd.c:(.text+0x133e): undefined reference to `fftwnd_destroy_plan’
rfftwnd.c:(.text+0x1373): undefined reference to `fftwnd_create_plans_generic’
rfftwnd.c:(.text+0x139d): undefined reference to `fftwnd_work_size’
rfftwnd.c:(.text+0x13b6): undefined reference to `fftw_malloc’
rfftwnd.c:(.text+0x13ff): undefined reference to `fftwnd_new_plan_array’
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_print_plan’:
rfftwnd.c:(.text+0x1554): undefined reference to `fftwnd_fprint_plan’
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_complex_to_real’:
rfftwnd.c:(.text+0xa31): undefined reference to `fftw_free’
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_real_to_complex’:
rfftwnd.c:(.text+0x1021): undefined reference to `fftw_free’
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_fprint_plan’:
rfftwnd.c:(.text+0x1161): undefined reference to `fftwnd_fprint_plan’
/usr/local/lib/librfftw.a(rfftwnd.o): In function `rfftwnd_destroy_plan’:
rfftwnd.c:(.text+0x1171): undefined reference to `fftwnd_destroy_plan’
/usr/local/lib/librfftw.a(rplanner.o): In function `rfftw_measure_runtime’:
rplanner.c:(.text+0x7b): undefined reference to `fftw_gettimeofday_get_time’
rplanner.c:(.text+0xac): undefined reference to `fftw_gettimeofday_get_time’
rplanner.c:(.text+0x11b): undefined reference to `fftw_gettimeofday_get_time’
rplanner.c:(.text+0x14a): undefined reference to `fftw_gettimeofday_time_diff’
rplanner.c:(.text+0x179): undefined reference to `fftw_gettimeofday_time_diff’
rplanner.c:(.text+0x1c1): undefined reference to `fftw_gettimeofday_time_diff’
rplanner.c:(.text+0x1f0): undefined reference to `fftw_gettimeofday_time_diff’
/usr/local/lib/librfftw.a(rplanner.o): In function `rfftw_print_plan’:
rplanner.c:(.text+0x274): undefined reference to `fftw_fprint_plan’
/usr/local/lib/librfftw.a(rplanner.o): In function `rplanner’:
rplanner.c:(.text+0x2cf): undefined reference to `fftw_lookup’
rplanner.c:(.text+0x2df): undefined reference to `fftw_use_plan’
rplanner.c:(.text+0x347): undefined reference to `fftw_wisdom_lookup’
rplanner.c:(.text+0x3c0): undefined reference to `fftw_make_node_hc2real’
rplanner.c:(.text+0x402): undefined reference to `fftw_make_plan’
rplanner.c:(.text+0x40c): undefined reference to `fftw_use_plan’
rplanner.c:(.text+0x42a): undefined reference to `fftw_complete_twiddle’
rplanner.c:(.text+0x47a): undefined reference to `fftw_pick_better’
rplanner.c:(.text+0x56c): undefined reference to `fftw_make_node_hc2hc’
rplanner.c:(.text+0x5ac): undefined reference to `fftw_make_plan’
rplanner.c:(.text+0x5b6): undefined reference to `fftw_use_plan’
rplanner.c:(.text+0x5d4): undefined reference to `fftw_complete_twiddle’
rplanner.c:(.text+0x5e5): undefined reference to `fftw_destroy_plan_internal’
rplanner.c:(.text+0x62c): undefined reference to `fftw_pick_better’
rplanner.c:(.text+0x683): undefined reference to `fftw_factor’
rplanner.c:(.text+0x76e): undefined reference to `fftw_make_node_rgeneric’
rplanner.c:(.text+0x7b0): undefined reference to `fftw_make_plan’
rplanner.c:(.text+0x7ba): undefined reference to `fftw_use_plan’
rplanner.c:(.text+0x7d8): undefined reference to `fftw_complete_twiddle’
rplanner.c:(.text+0x7ed): undefined reference to `fftw_destroy_plan_internal’
rplanner.c:(.text+0x834): undefined reference to `fftw_pick_better’
rplanner.c:(.text+0x85d): undefined reference to `fftw_insert’
rplanner.c:(.text+0x8af): undefined reference to `fftw_wisdom_add’
rplanner.c:(.text+0x9a0): undefined reference to `fftw_make_node_hc2hc’
rplanner.c:(.text+0x9e0): undefined reference to `fftw_make_plan’
rplanner.c:(.text+0x9ea): undefined reference to `fftw_use_plan’
rplanner.c:(.text+0xa08): undefined reference to `fftw_complete_twiddle’
rplanner.c:(.text+0xa19): undefined reference to `fftw_destroy_plan_internal’
rplanner.c:(.text+0xa60): undefined reference to `fftw_pick_better’
rplanner.c:(.text+0xa85): undefined reference to `fftw_estimate_node’
rplanner.c:(.text+0xb87): undefined reference to `fftw_make_node_hc2hc’
rplanner.c:(.text+0xbc7): undefined reference to `fftw_make_plan’
rplanner.c:(.text+0xbd1): undefined reference to `fftw_use_plan’
rplanner.c:(.text+0xbf0): undefined reference to `fftw_complete_twiddle’
rplanner.c:(.text+0xc01): undefined reference to `fftw_destroy_plan_internal’
rplanner.c:(.text+0xc72): undefined reference to `fftw_make_node_hc2real’
rplanner.c:(.text+0xcb4): undefined reference to `fftw_make_plan’
rplanner.c:(.text+0xcbe): undefined reference to `fftw_use_plan’
rplanner.c:(.text+0xce5): undefined reference to `fftw_complete_twiddle’
rplanner.c:(.text+0xd04): undefined reference to `fftw_estimate_node’
rplanner.c:(.text+0xd28): undefined reference to `fftw_estimate_node’
rplanner.c:(.text+0xd47): undefined reference to `fftw_make_node_real2hc’
rplanner.c:(.text+0xd5f): undefined reference to `fftw_estimate_node’
rplanner.c:(.text+0xd7e): undefined reference to `fftw_make_node_real2hc’
/usr/local/lib/librfftw.a(rplanner.o): In function `rfftw_create_plan_specific’:
rplanner.c:(.text+0xdd6): undefined reference to `fftw_make_empty_table’
rplanner.c:(.text+0xe24): undefined reference to `fftw_destroy_table’
rplanner.c:(.text+0xe3b): undefined reference to `fftw_complete_twiddle’
/usr/local/lib/librfftw.a(rplanner.o): In function `rfftw_create_plan’:
rplanner.c:(.text+0xeaf): undefined reference to `fftw_make_empty_table’
rplanner.c:(.text+0xef5): undefined reference to `fftw_destroy_table’
rplanner.c:(.text+0xf08): undefined reference to `fftw_complete_twiddle’
rplanner.c:(.text+0xf1e): undefined reference to `fftw_malloc’
rplanner.c:(.text+0xf46): undefined reference to `fftw_free’
rplanner.c:(.text+0xf5d): undefined reference to `fftw_make_empty_table’
rplanner.c:(.text+0xfa2): undefined reference to `fftw_destroy_table’
rplanner.c:(.text+0xfb5): undefined reference to `fftw_complete_twiddle’
/usr/local/lib/librfftw.a(rplanner.o): In function `rfftw_fprint_plan’:
rplanner.c:(.text+0x1): undefined reference to `fftw_fprint_plan’
/usr/local/lib/librfftw.a(rplanner.o): In function `rfftw_destroy_plan’:
rplanner.c:(.text+0x11): undefined reference to `fftw_destroy_plan_internal’
/usr/local/lib/librfftw.a(rexec.o): In function `rexecutor_simple_inplace’:
rexec.c:(.text+0x7b2): undefined reference to `fftw_malloc’
/usr/local/lib/librfftw.a(rexec.o): In function `rfftw’:
rexec.c:(.text+0xc36): undefined reference to `fftw_malloc’
/usr/local/lib/librfftw.a(rexec.o): In function `rfftw_executor_simple’:
rexec.c:(.text+0x217): undefined reference to `fftw_die’
/usr/local/lib/librfftw.a(rexec.o): In function `rexecutor_simple_inplace’:
rexec.c:(.text+0x7a3): undefined reference to `fftw_free’
/usr/local/lib/librfftw.a(rexec.o): In function `rfftw’:
rexec.c:(.text+0xc56): undefined reference to `fftw_free’
/usr/local/lib/librfftw.a(rgeneric.o): In function `fftw_hc2hc_backward_generic’:
rgeneric.c:(.text+0x50): undefined reference to `fftw_malloc’
/usr/local/lib/librfftw.a(rgeneric.o): In function `fftw_hc2hc_forward_generic’:
rgeneric.c:(.text+0x350): undefined reference to `fftw_malloc’
/usr/local/lib/librfftw.a(rgeneric.o): In function `fftw_hc2hc_backward_generic’:
rgeneric.c:(.text+0x2e7): undefined reference to `fftw_free’
/usr/local/lib/librfftw.a(rgeneric.o): In function `fftw_hc2hc_forward_generic’:
rgeneric.c:(.text+0x5c9): undefined reference to `fftw_free’
collect2: ld returned 1 exit status
make[2]: *** [demos/smoke/smoke] Error 1
make[1]: *** [demos/smoke/CMakeFiles/smoke.dir/all] Error 2
make: *** [all] Error 2

 Signature 

EasterIsland, LLC.
My Signature Quote

Profile
 
 
Posted: 14 April 2008 09:20 PM   [ Ignore ]   [ # 5 ]
New Member
Avatar
Rank
Total Posts:  87
Joined  2008-01-16

I’m narrowing the problem down to fftw(2.1.5) not being properly configured somewhere. There are so many f***ing configuration files in Linux that you never know what the f***ing problem is. :( It’s looking more and more like crappy linking to demo_smoke.

 Signature 

EasterIsland, LLC.
My Signature Quote

Profile
 
 
Posted: 15 April 2008 04:13 AM   [ Ignore ]   [ # 6 ]
Jr. Member
Avatar
RankRank
Total Posts:  101
Joined  2008-03-02

I’m using here fftw-2.1.5-r3 and btw. fftw doesn’t have any configuration files, my smoke app gives me the folowing deps:

ldd /opt/cvs/touchlib/385-bin/smoke
libdfftw
.so.2 => /usr/lib/libdfftw.so.2 (0xb79ad000)
libdrfftw.so.2 => /usr/lib/libdrfftw.so.2 (0xb7983000)

It looks like problem of fftw, it’s acting as if it didn’t get -lfftw -L/usr/local/lib (can’t find it’s own lib calls) and that’s rather
strange because cmake files works perfectly here, and I’m on a bleeding edge testing machine (everything .. well almost anyway,
is coming out from cvs,svn and git repositories)
Another shoot in the darkness, can you verify if your demos/smoke/CmakeFiles/smoke.dir/build.make contain
-lfftw -lrfftw (in my config its on line 208) and paste that line here ?

Profile
 
 
Posted: 15 April 2008 12:06 PM   [ Ignore ]   [ # 7 ]
New Member
Avatar
Rank
Total Posts:  87
Joined  2008-01-16

cd /usr/src/multitouch/demos/smoke && /usr/bin/c++ -fPIC $(smoke_OBJECTS) $(smoke_EXTERNAL_OBJECTS) -o smoke -rdynamic -L/usr/src/multitouch/src -L/usr/src/multitouch/tinyxml -L/usr/local/lib -Wl,-Bstatic -ltouchlib -ltinyxml -Wl,-Bdynamic -lGLU -lGL -lSM -lICE -lX11 -lXext -lglut -lXmu -lXi -lcv -lcxcore -lcvaux -lhighgui -Wl,-Bstatic -lfftw -lrfftw -Wl,-Bdynamic -Wl,-rpath,/usr/src/multitouch/src:/usr/src/multitouch/tinyxml:/usr/local/lib

That’s it for line 208 of build.make of the demo_smoke app. After various type of wiping and reinstalling I am left with this:

[ 94%] Building CXX object demos/smoke/CMakeFiles/smoke.dir/main.o
/usr/src/multitouch/demos/smoke/main.cc: In function ‘int main(int, char**)’:
/usr/src/multitouch/demos/smoke/main.cc:34: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:34: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:39: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:39: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:40: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:40: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:42: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:42: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:52: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:53: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:53: warning: deprecated conversion from string constant to ‘char*’
/usr/src/multitouch/demos/smoke/main.cc:60: warning: deprecated conversion from string constant to ‘char*’
make[2]: *** No rule to make target `/usr/local/lib/libfftw.a’, needed by `demos/smoke/smoke’.  Stop.
make[1]: *** [demos/smoke/CMakeFiles/smoke.dir/all] Error 2
make: *** [all] Error 2

Okay, so using YaST doesn’t do crap. Nothing gets placed in /usr/local/lib at all even though it says it’s installed it.  Making fftw manually doesn’t do anything except the error listed in the previous post above.  Manual or automatic doesn’t work. WTF am I left with? I did a search for ‘libfftw.a’ and got nothing.

 Signature 

EasterIsland, LLC.
My Signature Quote

Profile
 
 
Posted: 15 April 2008 02:01 PM   [ Ignore ]   [ # 8 ]
Jr. Member
Avatar
RankRank
Total Posts:  101
Joined  2008-03-02

I see that suse has 2 fftw packages, are you sure you didn’t install just fftw3?
anyway here I attached my version of libdfftw.a compiled with gcc (GCC) 4.2.2
on a 32 system (version of fftw is 2.1.5-r3) I hope it works out.

libdfftw.a

Profile
 
 
Posted: 15 April 2008 09:24 PM   [ Ignore ]   [ # 9 ]
New Member
Avatar
Rank
Total Posts:  87
Joined  2008-01-16

I’m not such a noob that I installed fftw3 by accident. 

*** No rule to make target `/usr/local/lib/libfftw.a’, needed by `demos/smoke/smoke’.

This is all I get.

 Signature 

EasterIsland, LLC.
My Signature Quote

Profile
 
 
Posted: 16 April 2008 05:49 AM   [ Ignore ]   [ # 10 ]
Jr. Member
Avatar
RankRank
Total Posts:  101
Joined  2008-03-02

Sorry, didn’t want to offend you, It happened to me, many times to overlook something. Anyway if you take a look you can see that
naming is different (I guess It’s an suse issue), while on my machine library is called libdfftw.a at yours it’s called libfftw.a (without D).
Aside that after googlin around I found following: http://www.novell.com/products/linuxpackages/opensuse102/fftw-devel.html
which includes /usr/lib/libdfftw.a so I would try to symlink it to libfftw.a and see If that helps. I guess the problem lies in following:
#define USE_FFTWF or #define USE_FFTWD (Use double precision FFTW if found) .. (build environment of suse which seems that has flaws)
This is one of the biggest reason that I’m using gentoo .. every binary distro has similar issues (dependencies, naming conventions etc)

Profile
 
 
Posted: 01 May 2008 01:20 AM   [ Ignore ]   [ # 11 ]
New Member
Avatar
Rank
Total Posts:  87
Joined  2008-01-16

Fixing the symbolic links worked. Just a distro thing like usual. *yawn*

 Signature 

EasterIsland, LLC.
My Signature Quote

Profile