Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.96k stars 11.35k forks source link

fftw failed to build on 10.8.5 #26154

Closed csann closed 10 years ago

csann commented 10 years ago

At first I compiled my own fftw. fftw worked when I compiled my own library. Because I compiled it myself, homebrew complained about fftw files in /usr/local. So I deleted it and installed fftw from homebrew. When I tried to compile and app that used fftw I got this error.

Undefined symbols for architecture x86_64: "_sfftw_destroyplan", referenced from: four2a in libjt9.a(four2a.o) filbig in libjt9.a(filbig.o) "_sfftwexecute", referenced from: four2a in libjt9.a(four2a.o) filbig in libjt9.a(filbig.o) "_sfftw_plan_dft1d", referenced from: four2a in libjt9.a(four2a.o) filbig in libjt9.a(filbig.o) "_sfftw_plan_dft_c2r1d", referenced from: four2a in libjt9.a(four2a.o) "_sfftw_plan_dft_r2c1d", referenced from: four2a in libjt9.a(four2a.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

refer to gist https://gist.github.com/8605960 for additional details.

mistydemeo commented 10 years ago

Can you provide more information on what software you're building and how you're doing so?

csann commented 10 years ago

Misty

Thank you for looking at this so quickly!!!

I am building a library called jt9 which is used by a program called wsjtx. wsjtx is a program for amateur radio. It listens for weak signals in the audio from an amateur radio. jt9 is one of the protocols used by wsjtx.

I have a custom makefile. To create jt9 I just type make.

Make works when I compile my own version of fftw. It does not work when I use the version from homebrew.

Does this give you the information you need?

Clark

On Jan 24, 2014, at 5:17 PM, Misty De Meo notifications@github.com wrote:

Can you provide more information on what software you're building and how you're doing so?

— Reply to this email directly or view it on GitHub.

mistydemeo commented 10 years ago

Are you able to to share your custom makefile, the software, and/or the full build logs for jt9?

csann commented 10 years ago

Yes

It will take me a bit. I have uninstalled fftw from homebrew and recompiled my own. I will uninstall my own fftw and reinstall fftw from homebrew. Then I will send you the makefile and the full build logs. It may be tomorrow morning before I can get this all sent to you.

On Jan 24, 2014, at 5:58 PM, Misty De Meo notifications@github.com wrote:

Are you able to to share your custom makefile, the software, and/or the full build logs for jt9?

— Reply to this email directly or view it on GitHub.

csann commented 10 years ago

Here is the makefile and full build log

On Jan 24, 2014, at 5:58 PM, Misty De Meo notifications@github.com wrote:

Are you able to to share your custom makefile, the software, and/or the full build logs for jt9?

— Reply to this email directly or view it on GitHub.

Note: fftw has been installed from home-brew

clarks-imac:~ Clark$ cd wsjtx/ clarks-imac:wsjtx Clark$ cd lib clarks-imac:lib Clark$ make gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c pctile.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c graycode.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c sort.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c ssort.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c unpackmsg.f90 gcc -I. -fbounds-check -fPIE -c igray.c clang: warning: argument unused during compilation: '-fbounds-check' gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c unpackcall.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c unpackgrid.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c grid2k.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c unpacktext.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c getpfx2.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c packmsg.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c deg2grid.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c packtext.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c getpfx1.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c packcall.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c k2grid.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c packgrid.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c nchar.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c four2a.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c grid2deg.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c pfxdump.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c f77_wisdom.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c symspec.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c analytic.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c db.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c genjt9.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c packbits.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c unpackbits.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c encode232.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c interleave9.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c entail.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c fano232.f90 gcc -I. -fbounds-check -fPIE -c gran.c clang: warning: argument unused during compilation: '-fbounds-check' gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c sync9.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c decode9.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c fil3.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c decoder.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c grid2n.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c n2grid.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c timer.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c softsym.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c peakdt9.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c getlags.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c afc9.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c fchisq.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c twkfreq.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c downsam9.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c symspec2.f90 g++ -c -I/Users/Clark/Qt5.2.0/5.2.0/clang_64/include -I/Users/Clark/Qt5.2.0/5.2.0/clang_64/lib/QTCore.framework/Headers -fPIE ipcomm.cpp gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c sleep_msec.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c stdmsg.f90 gfortran -c -fno-second-underscore sec_midn.f90 gcc -I. -fbounds-check -fPIE -c usleep.c clang: warning: argument unused during compilation: '-fbounds-check' usleep.c:4:3: warning: implicit declaration of function 'usleep' is invalid in C99 [-Wimplicit-function-declaration] usleep(_microsec); ^ 1 warning generated. gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c azdist.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c geodist.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c morse.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c fillcom.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c chkss2.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c zplot9.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c flat2.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c jt65a.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c symspec65.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c flat65.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c ccf65.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c decode65a.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c filbig.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c fil6521.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c afc65b.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c decode65b.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c setup65.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c extract.F90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c fchisq65.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c demod64a.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c chkhist.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c interleave63.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c ccf2.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c move.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c indexx.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c graycode65.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c twkfreq65.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c smo121.f90 gcc -I. -fbounds-check -fPIE -c wrapkarn.c clang: warning: argument unused during compilation: '-fbounds-check' gcc -c -DBIGSYM=1 -o init_rs.o init_rs.c gcc -c -DBIGSYM=1 -o encode_rs.o encode_rs.c gcc -c -DBIGSYM=1 -o decode_rs.o decode_rs.c gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c gen65.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c fil4.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c flat3.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c polfit.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c determ.f90 ar cr libjt9.a pctile.o graycode.o sort.o ssort.o unpackmsg.o igray.o unpackcall.o unpackgrid.o grid2k.o unpacktext.o getpfx2.o packmsg.o deg2grid.o packtext.o getpfx1.o packcall.o k2grid.o packgrid.o nchar.o four2a.o grid2deg.o pfxdump.o f77_wisdom.o symspec.o analytic.o db.o genjt9.o packbits.o unpackbits.o encode232.o interleave9.o entail.o fano232.o gran.o sync9.o decode9.o fil3.o decoder.o grid2n.o n2grid.o timer.o softsym.o peakdt9.o getlags.o afc9.o fchisq.o twkfreq.o downsam9.o symspec2.o ipcomm.o sleep_msec.o stdmsg.o sec_midn.o usleep.o azdist.o geodist.o morse.o fillcom.o chkss2.o zplot9.o flat2.o jt65a.o symspec65.o flat65.o ccf65.o decode65a.o filbig.o fil6521.o afc65b.o decode65b.o setup65.o extract.o fchisq65.o demod64a.o chkhist.o interleave63.o ccf2.o move.o indexx.o graycode65.o twkfreq65.o smo121.o wrapkarn.o init_rs.o encode_rs.o decode_rs.o gen65.o fil4.o flat3.o polfit.o determ.o ranlib libjt9.a gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c jt9sim.f90 gfortran -o jt9sim jt9sim.o -L. -ljt9 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c jt9.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c jt9a.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c jt9b.f90 gfortran -O0 -fbounds-check -Wall -Wno-conversion -fno-second-underscore -fPIE -DUNIX -c jt9c.f90 g++ -o jt9 jt9.o jt9a.o jt9b.o jt9c.o -L. -ljt9 /Users/Clark/Qt5.2.0/5.2.0/clang_64/lib/QtCore.framework/QtCore -lfftw3f -L/usr/local/Cellar/gfortran/4.8.2/gfortran/lib -lgfortran Undefined symbols for architecture x86_64: "_sfftw_destroyplan", referenced from: four2a in libjt9.a(four2a.o) filbig in libjt9.a(filbig.o) "_sfftwexecute", referenced from: four2a in libjt9.a(four2a.o) filbig in libjt9.a(filbig.o) "_sfftw_plan_dft1d", referenced from: four2a in libjt9.a(four2a.o) filbig in libjt9.a(filbig.o) "_sfftw_plan_dft_c2r1d", referenced from: four2a in libjt9.a(four2a.o) "_sfftw_plan_dft_r2c1d", referenced from: four2a in libjt9.a(four2a.o) ld: symbol(s) not found for architecture x8664 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: ** [jt9] Error 1

mistydemeo commented 10 years ago

What options do you use when building your own fftw?

csann commented 10 years ago

When I build it myself I do

make clean
configure  --enable-float
make
sudo make install       

On Jan 24, 2014, at 8:06 PM, Misty De Meo notifications@github.com wrote:

What options do you use when building your own fftw?

— Reply to this email directly or view it on GitHub.

csann commented 10 years ago

I looked at the formula for fftw. I don't see an option for --enable-float. Does that mean that someone simply needs to add that option to the formula?

Upon further inspection of the fftw installation docs, I think I see another problem. The formula issues ./configure --enable-single to create a single precision version of fftw. But the fftw docs don't show --enable-single is a proper flag. Instead, it shows --enable-float as the switch to produce a single-precision version of fftw.

Maybe the fix here is to modify the formula to replace --enable-single with --enable-float?

mistydemeo commented 10 years ago

The configure script shows both:

  --enable-single         compile fftw in single precision
  --enable-float          synonym for --enable-single
csann commented 10 years ago

I don't know much about home-brew or home-brew scripts, but my formula does not have "--enable-float' in it anywhere. I have ran brew update many times. Are you looking at a newer script? Maybe one that isn't available via brew update? I am looking at /usr/local/Library/Formula/fftw.rb.

On Jan 25, 2014, at 2:13 PM, Misty De Meo notifications@github.com wrote:

The configure script shows both:

--enable-single compile fftw in single precision --enable-float synonym for --enable-single — Reply to this email directly or view it on GitHub.

mistydemeo commented 10 years ago

The formula uses --enable-single, and the configure script implies that the two are aliases for each other.

csann commented 10 years ago

I am having trouble finding the configure script. Can you tell me where it will be located?

On Jan 25, 2014, at 2:30 PM, Misty De Meo notifications@github.com wrote:

The formula uses --enable-single, and the configure script implies that the two are aliases for each other.

— Reply to this email directly or view it on GitHub.

csann commented 10 years ago

I found my configure script and you are correct, it implies the two are aliases. But I'm not sure that is really the case. Later in the script it assigns 'enableval' to different settings depending on whether --enable-float 0r --enable-single is selected. I can't find what 'enableval' is used for.

Hell, I think I am going to modify my fftw.rb script to set --enable-float and see what happens. Do you think this could cause me any problems?

On Jan 25, 2014, at 2:30 PM, Misty De Meo notifications@github.com wrote:

The formula uses --enable-single, and the configure script implies that the two are aliases for each other.

— Reply to this email directly or view it on GitHub.

csann commented 10 years ago

I have found there are no problems with the fftw formula. The problem I was having was due to me not using the --with-fortran switch to install fftw. I am new with home-brew and didn't understand the importance of switches in general and this switch in particular.

Thank you for your help.

On Jan 25, 2014, at 3:07 PM, Clark Sann acsann@gmail.com wrote:

I found my configure script and you are correct, it implies the two are aliases. But I'm not sure that is really the case. Later in the script it assigns 'enableval' to different settings depending on whether --enable-float 0r --enable-single is selected. I can't find what 'enableval' is used for.

Hell, I think I am going to modify my fftw.rb script to set --enable-float and see what happens. Do you think this could cause me any problems?

On Jan 25, 2014, at 2:30 PM, Misty De Meo notifications@github.com wrote:

The formula uses --enable-single, and the configure script implies that the two are aliases for each other.

— Reply to this email directly or view it on GitHub.