CMake cannot find zita-convolver4 - cmake

I am trying to compile jconvolver, which depends on zita-convolver v. 4, using Kubuntu 18.04 LTS, KDevelop v. 5.2.1, gcc v. 7.5.0, CMake v. 3.10.2. However, as far as I can tell there is no deb-package for zita-convolver4. Although there is one marked for testing (https://tracker.debian.org/pkg/zita-convolver), it does not seem to be usable yet.
I have tried to compile zita-convolver4 from sources, but I end up with a linking error:
CMakeFiles/myproj.dir/jconvolver-1.0.3/source/zita-convolver.cc.o: In function `calloc_real(unsigned int)':
/home/me/projects/myproj/jconvolver-1.0.3/source/zita-convolver.cc:47: undefined reference to `fftwf_alloc_real'
CMakeFiles/myproj.dir/jconvolver-1.0.3/source/zita-convolver.cc.o: In function `calloc_complex(unsigned int)':
/home/me/projects/myproj/jconvolver-1.0.3/source/zita-convolver.cc:55: undefined reference to `fftwf_alloc_complex'
etc, etc.
I do have libfftw3-3 and libfftw3-dev installed, and in CMakeLists.txt I have:
find_package(Qt5Charts)
find_package(jack)
find_package(SndFile)
find_package(libfftw3)
target_link_libraries(myproj Qt5::Widgets Qt5::Charts jack sndfile fftw3)
The problem seems to be that the linker does not find the fftw3 library. What am I doing wrong?

Related

undefined symbol: __afl_area_ptr when trying to compile Kisak strike

I want to fuzz the map loading feature in counter strike. The source code for csgo got leaked a while back and here is a build which you can compile https://github.com/SwagSoftware/Kisak-Strike . However, when I try to compile it using this command:
AFL_USE_ASAN=1 PERSIST=1 cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_ROCKETUI=ON -DFREETYPE_LIBRARY=/usr/lib/x86_64-linux-gnu/libfreetype.so -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2/freetype/ -DUSE_KISAK_PHYSICS=ON -DCMAKE_C_COMPILER=/home/cyberhacker/Asioita/Hakkerointi/Counterstrikestuff/aflpp/afl-gcc-fastthing/AFLplusplus/afl-gcc-fast -DCMAKE_CXX_COMPILER=/home/cyberhacker/Asioita/Hakkerointi/Counterstrikestuff/aflpp/afl-gcc-fastthing/AFLplusplus/afl-g++-fast ..
and then when i try to run ./csgo_linux64 , it throws this error:
Failed to load the launcher(bin/linux64/launcher_client.so) (/home/cyberhacker/Asioita/Csgocompile/withjump/game/bin/linux64/libtier0_client.so: undefined symbol: __afl_area_ptr)
I am expecting it to just work as usual (same as with the regular build). It works completely fine when I try to compile it normally with this command:
cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_ROCKETUI=ON -DFREETYPE_LIBRARY=/usr/lib/x86_64-linux-gnu/libfreetype.so -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2/freetype/ -DUSE_KISAK_PHYSICS=ON -DCMAKE_C_COMPILER=/usr/bin/cc -DCMAKE_CXX_COMPILER=/usr/bin/c++ ..
and then make -j8
I searched a bit and found this: this . In that conversation they say that this error can be cause by compiling with afl-gcc but then linking with normal gcc or ld. However this is not the cause of my problem since I have looked through the cmake log files and the binaries are being linked with afl-g++-fast so this shouldn't be a problem in my case. I read somewhere that the libraries should be statically included, not dynamic but I do not think that it is a necessity. Feel free to look at the Kisak strike source code if you want to (obviously).

Make77 error while installing Darknet on Windows

I am facing the Make77 problem. Can somebody help me out?
mingw32-make
gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast obj/captcha.o obj/lsd.o obj/super.o obj/art.o obj/tag.o obj/cifar.o obj/go.o obj/rnn.o obj/segmenter.o obj/regressor.o obj/classifier.o obj/coco.o obj/yolo.o obj/detector.o obj/nightmare.o obj/instance-segmenter.o obj/darknet.o libdarknet.a -o darknet -lm -pthread libdarknet.a
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: obj/go.o:go.c:(.text+0x329f): undefined reference to `__WSAFDIsSet#8'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: obj/go.o:go.c:(.text+0x32e1): undefined reference to `select#20'
collect2.exe: error: ld returned 1 exit status
Makefile:77: recipe for target 'darknet' failed
mingw32-make: *** [darknet] Error 1
I was in your shoes a few weeks ago and managed to fix that.
I am confident, you are trying to compile the original repository of Darknet on a Windows machine.
Cause
Unfortunately, one of the libraries used in go.c is *nix-only. It has a counterpart in Windows called winsock.h, but apparently it is not enough and the problem still persists.
Solution
Instead what you should do is use another repo of Darknet which is ported to Windows properly and has a lot of support. It has exactly the same functionality as the original repo except for very little changes which only makes the framework better. Instead of compiling with make command, you should build it with Microsoft Visual Studio. You may go with the latest version of MVS. If you want to use a GPU and install correctly, make sure you follow the instructions here https://github.com/AlexeyAB/darknet#requirements . To avoid any weird errors, install the requirements in order.
When all requirements are installed, navigate to build/darknet and open darknet.sln. Switch to Release and x64 and build the project.
That should be it. If you have any issues, let me know so I can help you. Also, if this solution works for you, make sure to mark my reply as the best answer.

Can't find ogg with PkgConfig

I'm trying to build secondlife viewer but fail on:
Building 'Second Life Test' Version 3.8.5.34241
-- Found PkgConfig: /usr/bin/x86_64-pc-linux-gnu-pkg-config (found version "0.29")
-- checking for module 'ogg'
-- package 'ogg' not found
I've libogg installed: https://bpaste.net/show/c6d60173da44
full build log: https://bpaste.net/show/9b3ecbd254c4
pkg_check_modules soruce: https://bitbucket.org/lindenlab/viewer-release/src/dfd2e1723b72b62e8b6c3746fd5f7fbb1132f389/indra/cmake/Audio.cmake?at=default&fileviewer=file-view-default
full build log shows that I'm using USESYSTEMLIBS flag, that means that pkg_check_modules(OGG REQUIRED ogg) just doesn't find /usr/lib64/pkgconfig/ogg.pc with some reason...
What could cause such mysterious bug?
(here is CMakeOut log : https://bpaste.net/show/a2fc804afc73)
pkg-config --exists ogg --print-errors returns nothing
seems like just CMake doesn't work right -__-' https://github.com/Techwolf/techwolf-overlay/issues/2#issuecomment-144851500
This bug is in cmake 3.3.x, downgrade to 3.2.3-r1 will fix it
everything works with 3.2.3
-- checking for module 'ogg'
-- found ogg, version 1.3.2

Problems in MPICH 3.1.3 installation in OSX 10.10 with ifort compiler and Xcode 6.1

I am trying to build mpich 3.1.3. in a Mac OSX 10.10 Yosemite with Xcode 6.1 and intel compilers icc and ifort version 15.0.0 20140716. I get an error when I am building the installation. The error is the following:
GEN lib/libpmpi.la
ifort: command line warning #10006: ignoring unknown option '-force_load,src/mpl/.libs/libmpl.a'
ifort: command line warning #10006: ignoring unknown option '-force_load,/Users/alejandrodelacallenegro/Downloads/mpich-3.1.3/src/openpa/src/.libs/libopa.a'
ifort: command line warning #10006: ignoring unknown option '-force_load,src/mpi/romio/.libs/libpromio.a'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: object: lib/.libs/libpmpi.a(initthread.o) malformed object (section contents at offset 0 with a size of 1056, overlaps Mach-O headers at offset 0 with a size of 768)
I do not understand where the error come from, from the compiler or from libtool. I have also attached the outputs of the configuration and the build steps.
I finally found the cause of the problem. libtool was somehow corrupted, so I install it again, and then I don't get this error anymore. I have install Xcode again, but I suppose that installing it from macports, homebrew or from source solves the problem as well.
Alex

f2py: limit.h file missing in numpy in Windows

I’m having trouble compiling some FortranIV code using f2py and the g77 compiler. I need to do this to call some very old code written in Fortran to an already existing Python module. I have gcc installed through MinGW but I’m not sure if that makes any difference. I am also running Python 2.7 with Numpy 1.7 and SciPy 0.12. My OS is Windows7 x64 but I have made sure that all my installs are 32bit versions. I am new to Python, Fortran and this forum so please bear with me.
The error I am getting when I compile the code with f2py is as follows:
C:\Python27\lib\site-packages\numpy\core\include\numpy\npy_common.h:291: limits.h: No such file or directory
error: Command "gcc -mno-cygwin -mdll -O2 -w -Wstrict-prototypes - DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x0900 - Ic:\users\ncd69~1.boh\appdata\local\temp\tmpxbl4sc\src.win32-2.7 -IC:\Python27\lib\site- packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC - c:\users\ncd69~1.boh\appdata\local\temp\tmpxbl4sc\src.win32-2.7\hellomodule.c -o c:\users\ncd69~1.boh\appdata\local\temp\tmpxbl4sc\Release\users\ncd69~1.boh\appdata\local\temp\tmpxbl4sc\src.win32-2.7\hellomodule.o" failed with exit status 1
In order to isolate the problem I have used a test code that is compatible with the gfortran compiler. I make a call to the required compilers using ‘-c –compiler. The test is on the same lines as your basic ‘Hello World’. The error thrown up is identical for the real and test code. I looked up the erroneous file ‘npy_common.h’ and found that line 291 calls to include a header: limits.h.
Since the error occurs in the Numpy libraries I am assuming that the error is with Numpy? I can’t seem to figure out why this error would occur.