Re: Compiling with Scons on Mac arm64
Paola Ferrario <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, you are totally right! I checked and I was activating a conda enviroment that was still the x86_64 one and I was using the SCons installed in that environment. I installed the arm64 conda environment, installed SCons there and everything works fine now. Do you recommend not to import the whole environment as a safety rule? Thank you and Bill a lot for your help! Paola > On 2 Feb 2022, at 18:56, Mats Wichmann <[email protected]> wrote: > > On 2/1/22 10:36, Paola Ferrario 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? > > I wonder if it's picking up the incorrect arch from the shell > environment, since your example imports "everything" from there: > > env = Environment(variables=vars, ENV=os.environ) > > _______________________________________________ > Scons-users mailing list > [email protected] <mailto:[email protected]> > https://pairlist4.pair.net/mailman/listinfo/scons-users <https://pairlist4.pair.net/mailman/listinfo/scons-users> _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users