make win32/win64 failing: Linking carla-bridge-win*.exe
Hi! I'm getting this error after make win64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++:
Compiling CarlaPluginVST3.cpp (win64 bridge)
Compiling CarlaPluginAU.cpp (win64 bridge)
Compiling CarlaPluginJuce.cpp (win64 bridge)
Compiling CarlaStandalone.cpp (win64 bridge)
Linking carla-bridge-win64.exe
/usr/libexec/gcc/x86_64-w64-mingw32/ld: ../../build/modules/Release/jackbridge.win64e.a: error adding symbols: archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:291: ../../bin/carla-bridge-win64.exe] Error 1
make[1]: Leaving directory '/home/harrisonthorne/documents/Carla/source/bridges-plugin'
make: *** [Makefile:335: win64] Error 2
Likewise with make win32. Help?
Need some info about your system. which os and version? what version of mingw?
Gentoo Linux (kernel 5.2), mingw 6.0.0-r2. I'm building Carla from source without a package manager
~ $ uname -a
Linux hotpocket 5.2.0 #7 SMP Wed Jul 31 19:05:16 MDT 2019 x86_64 AMD FX-9800P RADEON R7, 12 COMPUTE CORES 4C+8G AuthenticAMD GNU/Linux
~ $ emerge --search mingw64-runtime
* cross-i686-w64-mingw32/mingw64-runtime
Latest version available: 6.0.0-r2
Latest version installed: 6.0.0-r2
Size of files: 8,834 KiB
Homepage: http://mingw-w64.sourceforge.net/
Description: Free Win64 runtime and import library definitions
License: BSD
* cross-x86_64-w64-mingw32/mingw64-runtime
Latest version available: 6.0.0-r2
Latest version installed: 6.0.0-r2
Size of files: 8,834 KiB
Homepage: http://mingw-w64.sourceforge.net/
Description: Free Win64 runtime and import library definitions
License: BSD
Sorry for taking long to reply. Can you provide the entire build log? Or did you find a way to build it in the mean time?
It's a bit late, but I got the same error on Gentoo (amd64) and got it working somehow. I think it's important to go through the whole building process in the correct order. Not sure about the RANLIB and AR variables, but I added them. Tested with this VST-Plugin: Bitsonic Keyzone Classic. Works great :-)
These are the steps I took (for full 32 and 64 bit plugin support):
1. install the mingw toolchains for 32 and 64 bit (https://wiki.gentoo.org/wiki/Mingw):
sudo emerge crossdev
sudo crossdev --target x86_64-w64-mingw32
sudo crossdev --target i686-w64-mingw32
2. Rebuild mingw64-runtime with necessary tools and libraries:
sudo USE="libraries idl tools" crossdev --ex-only --ex-pkg cross-x86_64-w64-mingw32/mingw64-runtime -t x86_64-w64-mingw32
sudo USE="libraries idl tools" crossdev --ex-only --ex-pkg cross-i686-w64-mingw32/mingw64-runtime -t i686-w64-mingw32
3. Install wine of course:
sudo emerge wine-vanilla
4. Get the sources of Carla:
cd ~; mkdir sources; cd sources
git clone https://github.com/falkTX/Carla.git
5. Build Carla and install to /usr/local:
cd Carla
make -j9
make -j9 posix32
make -j9 win32 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ RANLIB=i686-w64-mingw32-ranlib AR=i686-w64-mingw32-ar
make -j9 win64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ RANLIB=x86_64-w64-mingw32-ranlib AR=x86_64-w64-mingw32-ar
make -j9 wine32
make -j9 wine64
sudo make install PREFIX=/usr/local
OK, for anyone interested, here are working ebuilds (based on the ebuilds from the audio-overlay). New USE flags (off by default):
32bit (for native 32 bit plugins)
win32-vst
win64-vst
It checks for the mingw toolchain but won't be too verbose on how to install it. So be sure, that you have everything installed (see https://wiki.gentoo.org/wiki/Mingw).
To install the ebuilds, create a local overlay (described here: Gentoo Wiki: Custom repository).
Download carla-ebuilds.zip (includes v2.0.0 and 9999).
Then:
mkdir -p /var/db/repos/localrepo/media-sound/carla
unzip carla-ebuilds.zip -d /var/db/repos/localrepo/media-sound/carla
pushd /var/db/repos/localrepo/media-sound/carla
repoman manifest
popd
Unmask in package.accept_keywords and change USE flags, then:
emerge carla -av
hi @q-g-j I am trying to compile the carla bridges using your tutorial under Gentoo. Could you create a new ebuilds for 2.4.1 I am having this weird failure:
../mingw-std-threads/mingw.mutex.h:472:24: error: ‘class mingw_stdthread::once_flag’ conflicts with a previous declaration
472 | using mingw_stdthread::once_flag;
It is like that file is included multiple times and failing.
but I am seeing this: https://github.com/falkTX/Carla/blob/afd6f1bc1ffdc77e90b216b8635649da5bf2453b/source/modules/mingw-std-threads/mingw.mutex.h#L21
and I don't have more c++ knowledge to understand the failures.
Hi,
this error comes from using cross-x86_64-w64-mingw32/gcc version 11 together with the mingw-std-threads headers included in the Carla source code.
I have fixed the ebuild in my portage overlay. It should pull in cross-x86_64-w64-mingw32/gcc:10 as a dependency and use this version for building.
You can get it here: https://github.com/q-g-j/qgj-overlay
Also take a look at my portage config in my other repo: /etc/portage/package.use/cross-x86_64-w64-mingw32 You can install this file before emerging cross-x86_64-w64-mingw32/gcc:10 for the correct use flags.
@q-g-j Thank you very much I will use your overlay.
One question, if this project is not compiling with mingw gcc 11 that means is an application bug isn't it? I will try to compile it using mingw gcc 10 but I would rather preffer to use gcc 11 if is possible.
You can have multiple mingw gcc versions installed and keep 11 the default. My ebuild should use version 10 even if it is not set to default.
Furthermore, having mingw's gcc installed does not interfere with the other Gentoo packages which will always use the native compiler.
I didn't manage to fix the error myself but will look into it the next days. Maybe someone has a patch for std threads or sth.