投稿

1月, 2021の投稿を表示しています

Linux: (.text+0x20): undefined reference to `main'

イメージ
CMake中に組み込まれている関係でソースからscipyをビルドしたいのに以下のようなエラーが出て止まってしまう。 gfortran -Wall -g build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/scipy/fftpack/_fftpackmodule.o build/temp.linux-x86_64-2.7/scipy/fftpack/src/zfft.o build/temp.linux-x86_64-2.7/scipy/fftpack/src/drfft.o build/temp.linux-x86_64-2.7/scipy/fftpack/src/zrfft.o build/temp.linux-x86_64-2.7/scipy/fftpack/src/zfftnd.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/scipy/fftpack/src/dct.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/scipy/fftpack/src/dst.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/build/src.linux-x86_64-2.7/scipy/fftpack/fortranobject.o -L/opt/intel/ext_tools/lib -Lbuild/temp.linux-x86_64-2.7 -ldfftpack -lfftpack -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/scipy/fftpack/_fftpack.so /usr/lib/../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2:  エラー : ld  はステータス  1  で終了しました error: Command "gfortran -Wall -g build/temp.linu

cmakeエラー:Error running cmake::LoadCache(). Aborting. + 正しいバージョンが表示されない

イメージ
cmakeローカルインストール後、ccmakeしようとしたら Error running cmake::LoadCache(). Aborting. というエラーで一蹴される。 export CMAKE_ROOT=/xxx/share/cmake-3.xx/ とパスを通していなかっただけだったが、 ccmake --version とかやってもずっと古いバージョンの方が出続ける。 これはキャッシュの問題だったようで、 hash -r でキャッシュクリアしたらようやく新しいバージョンとして認識された。

cmake エラー:Unknown arguments specified

イメージ
久しぶりにコードをリコンパイルしようとしたら見慣れないエラーに衝突。 CMake Error at xxx.cmake:240 (if): if given arguments: "ALL" "IN_LIST" "Boost_FIND_COMPONENTS" Unknown arguments specified 結論、cmakeのバージョン摩擦が起きていた。 今回は、cmakeの別バージョンをローカルインストールした後、アンインストールの際にライブラリを残してしまったのが原因だったよう。 find ~/ | grep "cmake" で引っかかったライブラリをひたすら消したら通った。