TheTechnobear / Mi4Pd

Pure Data externals wrapping MI modules
91 stars 13 forks source link

error building in linux #21

Open someofthem98 opened 2 years ago

someofthem98 commented 2 years ago

linux@linux-VirtualBox:~$ cd '/home/linux/Scrivania/Mi4Pd-ee4913f4c823946adf78c2d64efd932250a28f09/build' linux@linux-VirtualBox:~/Scrivania/Mi4Pd-ee4913f4c823946adf78c2d64efd932250a28f09/build$ make [ 68%] Built target MILib [ 69%] Linking CXX shared library "../release/lib/brds~.pd_linux" /usr/bin/ld: ../mi/libMILib.a(macro_oscillator.cc.o): relocation R_X86_64_PC32 against symbol `_ZN6braids14lut_svf_cutoffE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: link finale non riuscito: bad value collect2: error: ld returned 1 exit status make[2]: [brds/CMakeFiles/brds.dir/build.make:85: release/lib/brds~.pd_linux] Errore 1 make[1]: [CMakeFiles/Makefile2:331: brds/CMakeFiles/brds.dir/all] Errore 2 make: *** [Makefile:84: all] Errore 2

Hi Technobear, i've installed latest cmake but getting this error, am i missing something? Thanks

someofthem98 commented 2 years ago

Solved using:

cmake .. -DCMAKE_CXX_FLAGS=-fPIC

giuliomoro commented 2 years ago

could it be that you are trying to build with clang ? I know that some versions of gcc default to -fpie, so it may that that's what was used to test this in the first place