Giter Club home page Giter Club logo

Comments (7)

matteo-frigo avatar matteo-frigo commented on June 20, 2024

It looks like "indent" does not like the "-kr" option. "indent" is a program that reformats C code (we use it to pretty-print codelets); "-kr" specifies that we want the style from the K&R C book (the only true style). I am not familiar with OSX---perhaps it has a different version of indent.

Can you try editing support/Makefile.codelets, find the INDENT= line, and replace it with

INDENT = cat

Even better, please tell us how the OSX indent should be invoked so that we can patch FFTW.

Thanks,
Matteo

from fftw3.

stevengj avatar stevengj commented on June 20, 2024

OSX has the BSD version of indent, which doesn't have the -kr option.

from fftw3.

MiguelPF avatar MiguelPF commented on June 20, 2024

Seems that instead of the -kr option one should use(for BSD indent):

-nbad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -nprs -npsl -saf -sai -saw -nsc -nsob -nss

Readed from here: http://stackoverflow.com/questions/1352104/how-do-i-tell-usr-bin-indent-on-mac-os-x-10-5-to-format-my-c-code-kr-style

However does not work, I end up installing gnu-indent and changing the line in support/Makefile.codelets to:

INDENT = gindent -kr -cs -i5 -l800 -fca -nfc1 -sc -sob -cli4 -TR -Tplanner -TV

Then I get the error:

libtool: link: gcc -D_THREAD_SAFE -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns -ffast-math -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic -Wno-long-long -Wshadow -Wbad-function-cast -Wwrite-strings -Wstrict-prototypes -Wredundant-decls -Wnested-externs -o bench bench-bench.o bench-hook.o bench-fftw-bench.o  ../threads/.libs/libfftw3_threads.a /Users/miguelpousafreire/Lion/miguel-fftw3/fftw3/.libs/libfftw3.a ../.libs/libfftw3.a ../libbench2/libbench2.a -lm
Undefined symbols for architecture x86_64:
  "_fftw_codelet_n1_2", referenced from:
      _fftw_solvtab_dft_standard in libfftw3.a(codlist.o)
     (maybe you meant: _fftw_codelet_n1_25, _fftw_codelet_n1_20 )
  "_fftw_codelet_n1_3", referenced from:
      _fftw_solvtab_dft_standard in libfftw3.a(codlist.o)
     (maybe you meant: _fftw_codelet_n1_32)
  "_fftw_codelet_n1_4", referenced from:
      _fftw_solvtab_dft_standard in libfftw3.a(codlist.o)
  "_fftw_codelet_n1_5", referenced from:
      _fftw_solvtab_dft_standard in libfftw3.a(codlist.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bench] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

from fftw3.

stevengj avatar stevengj commented on June 20, 2024

Did the codelet builds work? I assume you have ocaml installed?

from fftw3.

MiguelPF avatar MiguelPF commented on June 20, 2024

Yes the codelet builds and ocaml is installed,
The error is produced when make is in tests 'section'

Making all in tests
/bin/sh ../libtool  --tag=CC   --mode=link gcc -D_THREAD_SAFE  -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns -ffast-math -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic -Wno-long-long -Wshadow -Wbad-function-cast -Wwrite-strings -Wstrict-prototypes -Wredundant-decls -Wnested-externs   -o bench bench-bench.o bench-hook.o bench-fftw-bench.o ../threads/libfftw3_threads.la ../libfftw3.la ../libbench2/libbench2.a  -lm 

from fftw3.

rdolbeau avatar rdolbeau commented on June 20, 2024

The 'indent' issue should be fixed now.

As for the undefined symbols, it's likely the 'indent' failure caused empty codelet files to be generated. Remove them and try to rebuild (i.e. "find fftw3/ -type f -name '*.c' -size 0 -exec rm -f {} ;").

from fftw3.

sunjunlishi avatar sunjunlishi commented on June 20, 2024

2> problem.c
2> rank-geq2.c
2> solve.c
2> vrank-geq1.c
2> conf.c
2> creating C:/bin/fftw37/Debug/fftw3.lib ε’Œε―Ήθ±‘ C:/bin/fftw37/Debug/fftw3.exp
2>conf.c.obj : error LNK2001:unresolved _fftw_solvtab_dft_standard
2>conf.c.obj : error LNK2001: unresolved _fftw_solvtab_rdft_r2cf
2>conf.c.obj : error LNK2001: unresolved _fftw_solvtab_rdft_r2cb
2>conf.c.obj : error LNK2001: unresolved _fftw_solvtab_rdft_r2r
2>C:\bin\fftw37\Debug\fftw3.dll : fatal error LNK1120: 4 δΈͺ unresolved

from fftw3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.