dyld[38909]: symbol not found in flat namespace '_yylex' - flex-lexer

I have recently upgraded all installed components in macports.
Post the upgradation, cscope has stopped working.
when invoked on commandlind it exits with the following error
$ cscope
dyld[39064]: symbol not found in flat namespace '_yylex'
Abort
flex is installed and its lib is also available in the path
Any pointers in this will helpful

You had also asked this question in a MacPorts bug report where I eventually discovered that the problem only occurred on macOS 12 (Monterey) and only because MacPorts was running strip on the binary after it was built. I fixed the problem in MacPorts by no longer having MacPorts run strip on the binary. You reported in the ticket that this fixed the problem for you as well.
We had seen the problem on macOS 12.0.1, 12.1, and 12.2 with Xcode 13.1 and 13.2. Curiously even if the program was compiled and stripped on macOS 11 with Xcode 12 (where it worked fine) if that binary was then run on macOS 12 it failed again.
Stripping a binary probably shouldn't break it in this way, so this may be a bug in strip or some other component of Xcode or macOS so I reported it to Apple as feedback id FB9866173.

Related

Xcode 13.3/XCFramework compile error: section __DATA/__bss has type zero-fill but non-zero file offset for architecture arm64

One of my XCFrameworks throws the following error when building with Xcode 13.3 on running on the M1 chip.
section __DATA/__bss has type zero-fill but non-zero file offset for architecture arm64
There is no error with the same project on Xcode 13.2.1 running on Monterey. Also no error with Intel chips running on any Xcode or macOS version.
Has anyone seen this issue yet and know of a potential solution?
I got this error in the first place because I was using bogo's arm64-to-sim tool on Github to patch some of my existing frameworks to run on a simulator on an M1 chip. I updated to the latest version of the tool that fixes this issue, and it resolved. The fix is here: https://github.com/bogo/arm64-to-sim/pull/8

Cannot install the flutter application for ios

I got and Error which says that "found "xcode 10.1, build version 10b61". xcode 10.2 or greater is required to develop for ios. flutter ", Tried everything, but cannot make it work.
Its working on the Xcode, but unfortunately Its not working in VS Code.
The latest Xcode version is 11.3. Please update the Xcode in your mac machine and open Xcode to complete the installation of all necessary components.
Fluter requires Xcode command-line tools. to setup command-line tool run following in your terminal:
$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
$ sudo xcodebuild -runFirstLaunch
Detailed reference can be found in Fluter iOS setup. Hope this helps.
I had the same problem, my macbook is late 2011 so I couldn't update to Mojave or Catalina which is required by xcode 10.2 and above.
for people like me reaching here, I just updated my mac to Catalina (the same 2011 model) using dosdude patcher located at macOS Catalina Patcher. it works like a charm, I installed the latest xcode and now all is fine.

Project ERROR: This mkspec requires Xcode 4.3 or later

Scenario:
I have updated to Qt 5.9.6 and I have Xcode 10.0 running on High Sierra.
I have a Qt App that builds for OSX and iOS. And it builds and runs all well with Qt 5.9.4.
Now, I want to update to 5.9.6 for a reason. When I try to build for iOS using Qt 5.9.6, I get the following error
Project ERROR: This mkspec requires Xcode 4.3 or later
Question:
Is there a way to get around this issue?
Note that the OSX build using Qt 5.9.6 just works fine. I have QMAKE_IOS_DEPLOYMENT_TARGET set to 10.0 for iOS case
PS:
I also deleted the .qmake.stash and the .pro.user file from the root directory and restarted QtCreator to try build from a a fresh start. But still get the same issue!
This is bug in Qt, use Qt 5.9.7 where this bug is fixed.

Xcode 10.0 error: Couldn't IRGen expression, no additional error [duplicate]

Using Xcode 10, when I stop my app using a breakpoint and try to print the content of an object in the Console, I obtain:
"Couldn't IRGen expression, no additional error"
However, I can see the value of the object in the Variables View panel.
How can I make it evaluate my expression instead?
In lldb as a workaround you can use:
fr v productVersion
fr v productBuild
since Xcode 10.2
v productVersion
v productBuild
which prints local variable type and address from current call stack frame.
Apple documentation for these kind of lldb capabilities: https://developer.apple.com/library/archive/documentation/General/Conceptual/lldb-guide/chapters/C5-Examining-The-Call-Stack.html
UPDATE:
Another trick that seems to help is to set
Thanks.
I solved with rebuild carthage framework like imtx.me/archives/2719.html
carthage update --platform iOS --no-use-binaries
I had defined as build system: "Legacy Build System", I changed it to "New Build System", then I build the project, and then I put it back as "Legacy Build System" and it worked again.
For to change the build mode: File->Workspace settings...->Build System
For my colleague, carthage update --platform iOS --no-use-binaries was working but it was not for me. When I removed the Carthage folder and reran the command, the po command started working 🎉. I'm not sure if it's related but I'm on macOS Catalina 10.15.3 and he is on Mojave. We both have Carthage version 0.34.0.
My env: Xcode 11.6 and Xcode 12 Beta 6, carthage 0.34.0
In my case, my company wants me to make build of our app out of Xcode 12 beta and see what's broken. I did it and encounter another bug that crippled the carthage. I fixed it by following this answer in the same thread.
Then I switched back to Xcode 11.6, the error started to appear
error: Couldn't IRGen expression, no additional error
The variable inspector works normally but debug console is useless without print or po. It took me some time to search in SO before I realized this might be related to carthage. Then I updated all my dependencies using the following command
carthage bootstrap --platform iOS --no-use-binaries --cache-builds
Then the debug resume normal and I can use print/po again

Deleted Xcode 9 beta, Swift Compiler Error

Had been using Xcode 9 beta for a while, and then I updated Xcode 9 since now it has an official update. Then I removed the beta from my Desktop.
Now I have a problem compiling my project with the following error:
Header '/Users/sahn/Desktop/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/usr/include/CommonCrypto//CommonCrypto.h' not found
I've tried cleaning the project, cleaning build folder... but that Xcode-beta.app location won't go away.
How can I fix this?
Didn't work with XCode for almost a year now, but this usually could be fixed before with
xcode-select --switch /Applications/Xcode.app/Contents/Developer
This command is used to switch the location of the XCode. Might need sudo.
Documentation is here btw : https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
It turns out that the problem was an external framework, internally uses CommonCrypto framework, and the framework was compiled previously with the Xcode Beta.
Simply fixed by recompiling dependencies.

Resources