GithubHelp home page GithubHelp logo

Comments (7)

wtdcode avatar wtdcode commented on June 8, 2024

Unfortunately we never expect the xcode backend to work because we don't have any proficient knowledge on xcode development.

from unicorn.

firodj avatar firodj commented on June 8, 2024

In my case I got:

ERROR: "/Applications/Xcode-15.1.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc" cannot build an executable (is your linker broken?)

I found that this by commenting this line it will success!

--cc=${CMAKE_C_COMPILER}

Could anyone tell why is it here? (coming from Unicorn 2)

from unicorn.

wtdcode avatar wtdcode commented on June 8, 2024

This is from qemu. Commenting this line will give you inconsistent setup.

As far as I know about Xcode toolchain, it's probably your cc settings problem.

from unicorn.

firodj avatar firodj commented on June 8, 2024

After I investigated, the qemu/cofigure missing -isysroot flags that needed by apple clang if only invoked outside /usr/bin.

So there are two places for clang: /usr/bin/cc and /Applications/Xcode-15.1.0.app/.../usr/bin/cc. The 1st seems only a shim with "proper" search path, it being used when --cc flags omitted.

But, CMake the using 2nd ver which require -isysroot being passed to external script. CMake implicitly added these flags with value from CMAKE_OSX_SYSROOT on its generator.

I'm suggesting to add following lines, before calling qemu/cofigure:

   if (CMAKE_OSX_SYSROOT)
        set (EXTRA_CFLAGS "${EXTRA_CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT} ")
    endif()

from unicorn.

wtdcode avatar wtdcode commented on June 8, 2024

After I investigated, the qemu/cofigure missing -isysroot flags that needed by apple clang if only invoked outside /usr/bin.

So there are two places for clang: /usr/bin/cc and /Applications/Xcode-15.1.0.app/.../usr/bin/cc. The 1st seems only a shim with "proper" search path, it being used when --cc flags omitted.

But, CMake the using 2nd ver which require -isysroot being passed to external script. CMake implicitly added these flags with value from CMAKE_OSX_SYSROOT on its generator.

I'm suggesting to add following lines, before calling qemu/cofigure:

   if (CMAKE_OSX_SYSROOT)
        set (EXTRA_CFLAGS "${EXTRA_CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT} ")
    endif()

Great, thanks for investigating this. -isysroot was once there but removed because breaking when using /usr/bin/cc. I will have a look.

from unicorn.

wtdcode avatar wtdcode commented on June 8, 2024

link to #1924

from unicorn.

wtdcode avatar wtdcode commented on June 8, 2024

Fixed in a9a54ae

from unicorn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.