[Scons-users] Compiling with Scons on Mac arm64

Paola Ferrario paola.ferrario at dipc.org
Wed Feb 2 02:56:48 EST 2022


The problem is that the issue in compilation is prompted when it tries to link to an external library, so I think it needs to be there.

> On 2 Feb 2022, at 00:29, Bill Deegan <bill at baddogconsulting.com> wrote:
> 
> toy would be better if it was entirely self contained and I don't need to install anything extra to try it.
> Is that possible?
> 
> On Tue, Feb 1, 2022 at 1:36 PM Paola Ferrario <paola.ferrario at dipc.org <mailto:paola.ferrario at dipc.org>> wrote:
> Hi Bill! Thank you for your answer!
> 
> I’m using:
> 
> SCons-4.0.1
> python 3.6.8
> MacOS Monterey 12.2, Apple M1 Pro
> CommandLineTools 13
> I don’t have XCode installed
> 
> I’ve created a toy project, as you suggested: https://github.com/paolafer/toy-nexus <https://github.com/paolafer/toy-nexus>. The only dependency is GEANT4 (https://geant4.web.cern.ch/support/download <https://geant4.web.cern.ch/support/download>).
> 
> Let me know if there anything else I can provide!
> 
> Cheers
> 
> Paola
> 
>> On 1 Feb 2022, at 19:33, Bill Deegan <bill at baddogconsulting.com <mailto:bill at baddogconsulting.com>> wrote:
>> 
>> Paola,
>> 
>> We need more information.
>> Which version of Python, SCons, xcode?
>> 
>> Can you provide a toy project in github to reproduce this issue?
>> 
>> Then we can see directly your SCons usage and help resolve the issue.
>> 
>> -Bill
>> 
>> On Tue, Feb 1, 2022 at 9:36 AM Paola Ferrario <paola.ferrario at dipc.org <mailto:paola.ferrario at dipc.org>> wrote:
>> Hi all!
>> I’m having a problem compiling my C++ application using Scons on a Mac with M1 processor. 
>> Specifically, it seems that it tries to compile for a x86_64 architecture, since I see a lot of warnings such as 
>> "warning: ignoring file ..., building for macOS-x86_64 but attempting to link with file built for macOS-arm64”
>> when linking to third-party libraries, correctly compiled in the arm64 architecture. After the warnings, the compilation ends with error 
>> “ld: symbol(s) not found for architecture x86_64”
>> 
>> I was wondering if there is a flag I can pass to the compiler to specify the architecture. I’ve tried with 
>> 
>> -arch=arm64
>> 
>> but it doesn’t work.
>> What should I do?
>> 
>> Thank you and best regards
>> 
>> Paola
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org <mailto:Scons-users at scons.org>
>> https://pairlist4.pair.net/mailman/listinfo/scons-users <https://pairlist4.pair.net/mailman/listinfo/scons-users>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org <mailto:Scons-users at scons.org>
>> https://pairlist4.pair.net/mailman/listinfo/scons-users <https://pairlist4.pair.net/mailman/listinfo/scons-users>
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org <mailto:Scons-users at scons.org>
> https://pairlist4.pair.net/mailman/listinfo/scons-users <https://pairlist4.pair.net/mailman/listinfo/scons-users>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20220202/3547a620/attachment.htm>


More information about the Scons-users mailing list