Csound Csound-dev Csound-tekno Search About

[Csnd-dev] MacOSX Build Broken

Date2024-02-17 14:45
FromVictor Lazzarini
Subject[Csnd-dev] MacOSX Build Broken
I got this trying to build the latest develop, linking is broken.

Here is the current broken command

[ 72%] Linking C shared library ../libcmidi.dylib
cd /Users/victor/src/csound/debug/InOut && /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmidi.dir/link.txt --verbose=1
/Library/Developer/CommandLineTools/usr/bin/cc -DHAVE_CLOCK_GETTIME  -ffast-math -fomit-frame-pointer -DPFFFT_SIMD_DISABLE -DBETA -Wall -Wno-missing-field-initializers -fvisibility=hidden -std=gnu99 -DHAVE_VECLIB -DHAVE_ATOMIC_BUILTIN -DHAVE_CURL -DHAVE_PTHREAD -g -arch arm64 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -mmacosx-version-min=11 -dynamiclib -Wl,-headerpad_max_install_names -o ../libcmidi.dylib -install_name @rpath/libcmidi.dylib CMakeFiles/cmidi.dir/cmidi.c.o  -Wl,-rpath,/usr/local/lib /usr/local/lib/libsndfile.dylib /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreMIDI.framework /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreFoundation.framework  ld: warning: dylib (/usr/local/lib/libsndfile.dylib) was built for newer macOS version (13.3) than being linked (11.0)
ld: can't map file, errno=22 file '/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreFoundation.framework' for architecture arm64

and here is the old working command

[ 72%] Linking C shared library ../libcmidi.dylib
cd /Users/victor/src/csound/debug/InOut && /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmidi.dir/link.txt --verbose=1
/Library/Developer/CommandLineTools/usr/bin/cc -DHAVE_CLOCK_GETTIME  -ffast-math -fomit-frame-pointer -DPFFFT_SIMD_DISABLE -DBETA -Wall -Wno-missing-field-initializers -fvisibility=hidden -std=gnu99 -DHAVE_VECLIB -DHAVE_ATOMIC_BUILTIN -DHAVE_CURL -DHAVE_PTHREAD -g -arch arm64 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -mmacosx-version-min=11 -dynamiclib -Wl,-headerpad_max_install_names -o ../libcmidi.dylib -install_name @rpath/libcmidi.dylib CMakeFiles/cmidi.dir/cmidi.c.o  -framework CoreMIDI -framework CoreFoundation  
[ 72%] Built target cmidi

There is a lot wrong with the current build:

(1) PLUGINS DO NOT NEED TO LINK TO LIBSNDFILE!

This should not be there

 -Wl,-rpath,/usr/local/lib /usr/local/lib/libsndfile.dylib 

(2) The correct options for system frameworks is:

-framework CoreMIDI -framework CoreFoundation

and not simply adding the framework to the command

/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreMIDI.framework
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreFoundation.framework

Can this be reverted please? 

I am not following all these changes to CMake, but they can’t be done with disregard to how Csound works and
how it should be built on all supported platforms

========================
Prof. Victor Lazzarini
Maynooth University
Ireland


Date2024-02-17 15:19
FromVictor Lazzarini
SubjectRe: [Csnd-dev] MacOSX Build Broken
Ok, so I restored the build on MacOSX and I have also removed the linking to libsndfile for plugins (it’s added when needed, e.g. utilities)
Also there is a problem that the header for libsndfile (needed for csoundCore.h) was not found once I removed the linking. I fixed it
by adding the /usr/local/include to the private includes but that’s not the correct fix.

So this needs to be seen to. 

I committed this directly to develop because it was an urgent fix.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 17 Feb 2024, at 14:45, Victor Lazzarini  wrote:
> 
> I got this trying to build the latest develop, linking is broken.
> 
> Here is the current broken command
> 
> [ 72%] Linking C shared library ../libcmidi.dylib
> cd /Users/victor/src/csound/debug/InOut && /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmidi.dir/link.txt --verbose=1
> /Library/Developer/CommandLineTools/usr/bin/cc -DHAVE_CLOCK_GETTIME  -ffast-math -fomit-frame-pointer -DPFFFT_SIMD_DISABLE -DBETA -Wall -Wno-missing-field-initializers -fvisibility=hidden -std=gnu99 -DHAVE_VECLIB -DHAVE_ATOMIC_BUILTIN -DHAVE_CURL -DHAVE_PTHREAD -g -arch arm64 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -mmacosx-version-min=11 -dynamiclib -Wl,-headerpad_max_install_names -o ../libcmidi.dylib -install_name @rpath/libcmidi.dylib CMakeFiles/cmidi.dir/cmidi.c.o  -Wl,-rpath,/usr/local/lib /usr/local/lib/libsndfile.dylib /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreMIDI.framework /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreFoundation.framework  ld: warning: dylib (/usr/local/lib/libsndfile.dylib) was built for newer macOS version (13.3) than being linked (11.0)
> ld: can't map file, errno=22 file '/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreFoundation.framework' for architecture arm64
> 
> and here is the old working command
> 
> [ 72%] Linking C shared library ../libcmidi.dylib
> cd /Users/victor/src/csound/debug/InOut && /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmidi.dir/link.txt --verbose=1
> /Library/Developer/CommandLineTools/usr/bin/cc -DHAVE_CLOCK_GETTIME  -ffast-math -fomit-frame-pointer -DPFFFT_SIMD_DISABLE -DBETA -Wall -Wno-missing-field-initializers -fvisibility=hidden -std=gnu99 -DHAVE_VECLIB -DHAVE_ATOMIC_BUILTIN -DHAVE_CURL -DHAVE_PTHREAD -g -arch arm64 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -mmacosx-version-min=11 -dynamiclib -Wl,-headerpad_max_install_names -o ../libcmidi.dylib -install_name @rpath/libcmidi.dylib CMakeFiles/cmidi.dir/cmidi.c.o  -framework CoreMIDI -framework CoreFoundation  
> [ 72%] Built target cmidi
> 
> There is a lot wrong with the current build:
> 
> (1) PLUGINS DO NOT NEED TO LINK TO LIBSNDFILE!
> 
> This should not be there
> 
> -Wl,-rpath,/usr/local/lib /usr/local/lib/libsndfile.dylib 
> 
> (2) The correct options for system frameworks is:
> 
> -framework CoreMIDI -framework CoreFoundation
> 
> and not simply adding the framework to the command
> 
> /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreMIDI.framework
> /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreFoundation.framework
> 
> Can this be reverted please? 
> 
> I am not following all these changes to CMake, but they can’t be done with disregard to how Csound works and
> how it should be built on all supported platforms
> 
> ========================
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 


Date2024-02-17 17:39
FromVictor Lazzarini
SubjectRe: [Csnd-dev] MacOSX Build Broken
Fixed that libsndfile header addition.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 17 Feb 2024, at 15:19, Victor Lazzarini  wrote:
> 
> Ok, so I restored the build on MacOSX and I have also removed the linking to libsndfile for plugins (it’s added when needed, e.g. utilities)
> Also there is a problem that the header for libsndfile (needed for csoundCore.h) was not found once I removed the linking. I fixed it
> by adding the /usr/local/include to the private includes but that’s not the correct fix.
> 
> So this needs to be seen to. 
> 
> I committed this directly to develop because it was an urgent fix.
> ========================
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
>> On 17 Feb 2024, at 14:45, Victor Lazzarini  wrote:
>> 
>> I got this trying to build the latest develop, linking is broken.
>> 
>> Here is the current broken command
>> 
>> [ 72%] Linking C shared library ../libcmidi.dylib
>> cd /Users/victor/src/csound/debug/InOut && /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmidi.dir/link.txt --verbose=1
>> /Library/Developer/CommandLineTools/usr/bin/cc -DHAVE_CLOCK_GETTIME  -ffast-math -fomit-frame-pointer -DPFFFT_SIMD_DISABLE -DBETA -Wall -Wno-missing-field-initializers -fvisibility=hidden -std=gnu99 -DHAVE_VECLIB -DHAVE_ATOMIC_BUILTIN -DHAVE_CURL -DHAVE_PTHREAD -g -arch arm64 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -mmacosx-version-min=11 -dynamiclib -Wl,-headerpad_max_install_names -o ../libcmidi.dylib -install_name @rpath/libcmidi.dylib CMakeFiles/cmidi.dir/cmidi.c.o  -Wl,-rpath,/usr/local/lib /usr/local/lib/libsndfile.dylib /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreMIDI.framework /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreFoundation.framework  ld: warning: dylib (/usr/local/lib/libsndfile.dylib) was built for newer macOS version (13.3) than being linked (11.0)
>> ld: can't map file, errno=22 file '/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreFoundation.framework' for architecture arm64
>> 
>> and here is the old working command
>> 
>> [ 72%] Linking C shared library ../libcmidi.dylib
>> cd /Users/victor/src/csound/debug/InOut && /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmidi.dir/link.txt --verbose=1
>> /Library/Developer/CommandLineTools/usr/bin/cc -DHAVE_CLOCK_GETTIME  -ffast-math -fomit-frame-pointer -DPFFFT_SIMD_DISABLE -DBETA -Wall -Wno-missing-field-initializers -fvisibility=hidden -std=gnu99 -DHAVE_VECLIB -DHAVE_ATOMIC_BUILTIN -DHAVE_CURL -DHAVE_PTHREAD -g -arch arm64 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -mmacosx-version-min=11 -dynamiclib -Wl,-headerpad_max_install_names -o ../libcmidi.dylib -install_name @rpath/libcmidi.dylib CMakeFiles/cmidi.dir/cmidi.c.o  -framework CoreMIDI -framework CoreFoundation  
>> [ 72%] Built target cmidi
>> 
>> There is a lot wrong with the current build:
>> 
>> (1) PLUGINS DO NOT NEED TO LINK TO LIBSNDFILE!
>> 
>> This should not be there
>> 
>> -Wl,-rpath,/usr/local/lib /usr/local/lib/libsndfile.dylib 
>> 
>> (2) The correct options for system frameworks is:
>> 
>> -framework CoreMIDI -framework CoreFoundation
>> 
>> and not simply adding the framework to the command
>> 
>> /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreMIDI.framework
>> /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreFoundation.framework
>> 
>> Can this be reverted please? 
>> 
>> I am not following all these changes to CMake, but they can’t be done with disregard to how Csound works and
>> how it should be built on all supported platforms
>> 
>> ========================
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>> 
>