[OSX 10.10.5, XCode 7.0.1]
I'm getting an error during my build stating that Otool can't copy a file:
error: otool: can't open file: /usr/local/opt/llvm/lib/libclang.3.6.dylib: (No such file or directory)
The two lines before the error (and what I think is causing it, because there are no other error indications) are:
cp -p /usr/local/opt/llvm/lib/libclang.3.6.dylib /Users/me/Library/Developer/Xcode/DerivedData/MiCASE-asvgjysohljplretlamgcpgnxgiq/Build/Products/Debug/MiCASE.app/Contents/Frameworks
cp -p /usr/local/opt/llvm/lib/libclang.3.6.dylib: /Users/me/Library/Developer/Xcode/DerivedData/MiCASE-asvgjysohljplretlamgcpgnxgiq/Build/Products/Debug/MiCASE.app/Contents/Frameworks
When I manually perform the command in a terminal, it works fine. I've set the permissions of the dynamic library to me:admin 777, so the file definitely exists. Thus I don't understand why I am getting the error.
This leads me to believe there is something else that is failing but the build log isn't showing it.
I'm also getting this error at the end of the script, but I think it's due to the above:
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
Solution
#trojanfoe, thanks for the info.
The problem was that as part of the build, a script was being run. In the script otool was being used to extract dependencies, and filtering of its output was done incorrectly. Fixing the filtering resolved the issue.
Related
Trying to use the https://github.com/gographics/imagick magickwand library to identify original file types (ex:png to jpeg I want to know it was a png)
If I try to run the script from the local directory I get the error on the rightside terminal
undefined reference to `mingw_initltsdrot_force' collect2.exe: error: ld returned 1 exit status (exit status 2)
although if I run it from c:\imagick-master, I get the expected result which is the script actually running as shown on the left terminal (I know theres an error on the left "correct" terminal but I can fix that) https://imgur.com/a/oxdS1A4
I figured because of the directory playing a part in running or not, including on vscode, that it was a path issue, so I added C:\imagick-master to my path and I'm still getting the error.
I could do all my coding within the C:\imagick-master directory to have it run, but this is not sustainable as I can not use VScode this way plus it seems a little bit too bad practice to always run in that directory and not the local scripts directory
Ive included photos to the errors I'm getting, the left terminal is exactly what I expect and hope to recieve but the issue is I cant run it in the local directory which is where vscode will run from, making me unable to use an IDE. Have not been able to find anyone with the same error..
Background
I have some docs which include some download files. See example:
Make sure to download :download:`this file</foo/bar_v1.2.tar>` for more details
The site/downloads/foo/bar.tar file is created and moved into the directory as part of the build process.
I am using the sphinx-build -M html . site -W to build the docs.
My issue
When we change the version of the file, the file name changes. Sometimes folks can forget to update this place in the docs and rename the download file correctly.
When I run the sphinx-build command, I see the following error:
download file not readable: /path/to/site/downloads/foo/bar_v1.2.tar
... but the build process continues and sphinx-build exits 0.
My question
I would like sphinx-build to error out when it encounters an unreadable file, but I cannot figure out how to do this.
As noted above, I have tried the -W which is supposed to turn warnings into errors, but it does not work.
Other possibilities
My question stated that I think my problem will be solved by causing sphinx-build to fail for download file not readable messages, but if anyone else has solved similar issues in another way, I would love to hear about it
Thanks.
Easy bounty here for grabs. Does not necessarily require any react-native experience. Problem seems to be in open source code, which is available out there:
Updated xcode, and now when I try to run my react-native app by issuing following command: react-native run-ios I get an error:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
error Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/MyAppName.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
debug Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/MyAppName.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:616:11)
at Object.execFileSync (child_process.js:634:13)
at runOnSimulator (project-root-dir/node_modules/#react-native-community/cli/build/commands/runIOS/runIOS.js:181:45)
Before those errors, the command prints out info about successful build, and that it is about to install the build:
info ** BUILD SUCCEEDED **
info Installing DerivedData/Build/Products/Debug-iphonesimulator/MyAppName.app
So it seems the build is ok, but when it tries to install the app it fails?
Think I've tried "everything" I found from other questions with this similar error message, but nothing has worked for me.
Some specs:
react-native: 0.59.10
react: 16.8.3
xcode-version: Version 12.2 (12B45b)
I know there are similar questions on stackoverflow. But since none of the solutions provided there worked for me, and I wish to get it fixed, I made this separate question.
I do not know where the Info.plist file is that it tries to find: DerivedData/Build/Products/Debug-iphonesimulator/MyAppName.app/Info.plist
Inside my ios folder, there is a folder called DerivedData, but inside that there are no folder with a name Build. So I think it might be looking from a wrong location?
UPDATE:
I've been able to pinpoint where the cli launch goes wrong:
https://github.com/react-native-community/cli/blob/ba298d9c47af522f0377325bebc6c2075d41790a/packages/platform-ios/src/commands/runIOS/index.ts#L378
If I change that line let buildPath = build/${scheme}/Build/Products/${configuration}-${device}/${appName}.app
to -> build/${scheme}/Build/Products/${configuration}-${device}/MyAppRealName.app;
Then the dev launch works nicely, there's no problem. So it seems that getting the appName goes wrong. The appName is resolved here: https://github.com/react-native-community/cli/blob/ba298d9c47af522f0377325bebc6c2075d41790a/packages/platform-ios/src/commands/runIOS/index.ts#L387
const productNameMatch = /export FULL_PRODUCT_NAME="?(.+).app"?$/m.exec(buildOutput);
I could do a post install npm script that just sets the name of the app correct and call it a day. But that's pretty hacky way. I wonder if there's an alternative that works better? I see that the runIOS file has been updated from the version that I have quite much, but the function getProductName still remains the same. So Im not sure if updating just the cli would work, or if it would even be possible, because it might require a newer react-native version, which is not an option for me right now.
newer version of #react-native-community/cli is not working on older version react-native because in newer version they have change getProductName to getPlatformName. for more detail you can read summary of this PR
Solution
As a local workaround, patch the package by patch-package node_modules/#react-native-community/cli-platform-ios/build/commands/runIOS/index.js and edited getProductName (lines 362–365) to read:
function getProductName(buildOutput) {
const productNameMatch = /export FULL_PRODUCT_NAME\\?="?(.+).app"?$/m.exec(buildOutput);
return productNameMatch ? productNameMatch[1].replace(/(?:\\(.))/g, '$1') : null;
}
The result from react-native run-ios is:
DerivedData/Build/Products/Debug-iphonesimulator/MyAppName.app/Info.plist
The correct should be:
DerivedData/Build/Products/Debug-iphonesimulator/MyAppRealName.app/Info.plist
Then you could fix it by edit Xcode project as:
Open Product menu (status bar)
Scheme -> Edit Scheme
Under build section, add a post-action
In provide build settings from: choose target of your app
Use the script to copy wrongname.app to realname.app: cp ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app ${BUILT_PRODUCTS_DIR}/real_name.app
Or you can use symlinks instead of copying.
I like to use the Chromium browser instead of the WebKit browser in my OS X project.
I downloaded the binary files at https://cefbuilds.com
I builded with cmake that creates a cef.xcodeproj.
Once I open that and want to build it. It first gives me problems because virtual bool Execute needs to be override. When I solved that error it goes a lot futher but crashes at:
cefsimple /bin/sh: tools/make_more_helpers.sh: /bin/bash: bad interpreter: Operation not permitted
make: *** [cefsimple_buildpart_2] Error 126
Command /bin/sh failed with exit code 2
Can anyone explain what I'm doing wrong?
In OS X versions 10.7.4 and above extended attributes are added to executable files (including shell scripts) and handled by the security settings you have defined for your account. For example checking the xattr on one of your build scripts might look similar to this:
$ ls -l# make_more_helpers.sh
-rwxr-xr-x# 1 Hellman staff 3564 Sep 2 07:02 make_more_helpers.sh
com.apple.quarantine 23
When Xcode tries to execute the script (again depending on your security settings) it will look at the extended attributes and determine whether or not to allow it to execute. If it finds that the creator of the script has not been approved you will receive an error such as:
make_more_helpers.sh: /bin/bash: bad interpreter: Operation not permitted
Fortunately it's an easy fix and there are quite a few ways to remedy it. One such way would be to associate scripts that are part of projects you build with Xcode. You could also open the script in an editor that is allowed to run scripts and re-save it, or just recursively scan your build directory for files with quarantine attributes and remove the attribute:
xattr -rd com.apple.quarantine /path/to/build
After you do this you should notice that doing another ls -l# on your script the # following the permissions and the com.apple.quarantine should be removed. Now when you try building your project the script should be allowed to execute and succeed.
↳ https://developer.apple.com/library/mac/documentation/OpenSource/Conceptual/ShellScripting/BeforeYouBegin/BeforeYouBegin.html
I installed Plone 4.1.3 and I am trying to make a theme. I saw this link talk about this issue:
http://www.treebrolly.com/blog/turbo-plone-theming-with-xdv-diazo
and I followed the commands. When I run this command
$ ./bin/instance fg
it says
Error: error opening file /home/hosam/plone413/zinstance/parts/instance/etc/zope.conf: [Errno 2] No such file or directory: '/home/hosam/plone413/zinstance/parts/instance/etc/zope.conf'
For help, use ./bin/instance -h
hosam#hosam-desktop:~/plone413/zinstance$
I noticed that when I run this command
$ ./bin/buildout -c demo.cfg
this directory and its contents are deleted /home/hosam/plone413/zinstance/parts/instance/
and so this error appears to me, Any can help??
When you run :
$ ./bin/buildout -c demo.cfg
the parts folder is supposed to be deleted and rebuilt (that's fine).
The error you are facing says that this command doesn't end correctly. Try to add the -v parameter
$ ./bin/buildout -v -c demo.cfg
so you will have a more verbose output and you can provide here a complete error traceback
Set up your demo.cfg in a different buildout directory. Looking at the blog entry you mentioned, it's meant to standalone, not share the same buildout directory with a zope/plone instance.
You might want to consider using plone.app.theming instead of XDV. The big difference is that plone.app.theming runs inside Plone and doesn't require any separate build. That really simplifies things if you don't need to mix in content from non-Plone sources.