I just addred Growl integration to an Xcode application. The source compiles and runs correctly under the Debug target while testing.
When I try to build the Release target however, I get the following error and I'm not sure why, or whoe to resolve it.
Building target “EchowavesNotifier” of project “EchowavesNotifier” with configuration “Release” — (1 error)
cd /src/echowaves-notifier-osx
/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -strip-debug-symbols -resolve-src-symlinks /src/echowaves-notifier-osx/Growl.framework /src/echowaves-notifier-osx/build/Release/EchowavesNotifier.app/Contents/Frameworks
strip: for architecture x86_64 object: /src/echowaves-notifier-osx/Growl.framework/Versions/A/Growl malformed object (unknown load command 5)
pbxcp: warning: couldn't strip: /src/echowaves-notifier-osx/build/Release/EchowavesNotifier.app/Contents/Frameworks/Growl.framework/Versions/A/Growl: No such file or directory
pbxcp: warning: couldn't strip: /src/echowaves-notifier-osx/build/Release/EchowavesNotifier.app/Contents/Frameworks/Growl.framework/Versions/A/Growl: No such file or directory
pbxcp: warning: couldn't strip: /src/echowaves-notifier-osx/build/Release/EchowavesNotifier.app/Contents/Frameworks/Growl.framework/Versions/A/Growl: No such file or directory
pbxcp: warning: couldn't strip: /src/echowaves-notifier-osx/build/Release/EchowavesNotifier.app/Contents/Frameworks/Growl.framework/Versions/A/Growl: No such file or directory
Build failed (1 error)
Is it some kind of 64-bit (x86_64) related issue?
I ran into this recently when upgrading Growl, and several other groups have noted it (I found some traffic on the Unison.app list). What seems to be happening is some kind of mismatch at the link step, though I haven't been able to isolate it.
The solution I've found so far is to delete the entire build/ directory and rebuild (which is much more than just doing a "clean" in xcode). So far I have not seen the problem recur for any developer after performing that. Please let me know if this does or doesn't fix your problem, since I want to know whether I need to continue hunting solutions for this problem should it come back.
Related
I'm trying to run a piece of software I built in MSYS2 MINGW32 shell. The software is 32bits (don't have time to port it to 64bits) and there is one statically linked executable. Here is how I setup the build environment:
Installed a fresh copy of MSYS2;
$ pacman -Syu
Installed the following packages: git mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-SDL mingw-w64-i686-SDL_mixer mingw-w64-i686-zlib mingw-w64-i686-libpng mingw-w64-i686-make
Git checkout the repo
Run the build in CMake
Build runs fine and the exe is generated.
Now the problem starts: the executable can't run and displays an error message about missing DLLs. I copied the missing DLLs to the same folder of the executable, and them another error message pops up complaining about error 0xC000007B, which I tracked down to be missing dependencies. After a while I figured out that the problem was that some of the DLLs is missing a dependency itself. Copied this last dependency to the folder.
Now, the big question: I can run the exe perfectly fine in the MINGW32 shell but I can't run it neither in cmd.exe nor by double-clicking in Windows Explorer and this is a problem (I can't ship a software this way). Is there any way to produce a binary that is able to run from explorer and from cmd.exe? What is the cause of this problem? Can it be mitigated?
I solved my problem!
After a lot of research, I realized that nothing was wrong with my MSYS2 build/setup/dependencies. The real problem was that CMake hide one parameter for the linker: -mwindows. Actually, the CMake find_package routine from one of the libraries I'm using (SDL) added this parameter to the linker command line parameters.
Adding a -mconsole to the linker parameters (using add_link_options("-mconsole")) solved the problem. The CLI now works as expected.
Thank you all for your help.
When attempting to compile my app, I’m getting an error from the SDK itself:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "LibcOverlayShims.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/shims/LibcOverlayShims.h:66:10: error: use of undeclared identifier 'errno'
return errno;
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "LibcOverlayShims.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/shims/LibcOverlayShims.h:70:3: error: use of undeclared identifier 'errno'
errno = value;
^
<unknown>:0: error: could not build Objective-C module 'SwiftOverlayShims'
It almost seems like errno.h isn’t included, but I can see that it is on line 33 of that file. I’ve tried the usual derived data delete, product clean, reinstall Xcode, reboot. I’ve tried stripping parts out of the app to try to see what’s causing it, but haven’t gotten very far.
Edit: An archive of the app appears to trigger it. Running in debug mode is perfectly fine, then I archive and it breaks it. Trying to run from debug again fails. Making random changes to the project file, then running a git reset --hard then allows debug to work again until I try to archive. It seems like something is wrong with the release settings that then carries over into subsequent debug builds (even with a clean)
I ended up figuring this out months later. Our software ships with this folder /usr/local/opt/company_name that contains a few libraries, software packages, etc. Our Swift code links with a number of them, so it was easiest to set Xcode to recursively search that directory for both headers and libraries rather than individually specifying them.
For some rather painful reasons, a copy of python is actually shipped in that folder. Well turns out some header file in that python directory was making Xcode very unhappy and triggering that compiler error. I manually specified the libraries we needed to link against and problem solved.
I am a beginner in Objective-C language. I have downloaded and installed GNUstep msys and GNUstep core and installed them in order, as mentioned in the downloads page of GNUstep.
But, I think that the installation isn't correct, because whenever I try to compile an Objective-C source file, it shows fatal error Foundation/Foundation.h file not found. Means, due to some reasons, the path to the header files isn't valid.
Although I am now successfully able to compile the source file with the -I and -L options, I faced another problem. After compilation, when I run the compiled exe file, it shows an error that many dll files are missing, such as objc-4.dll, gnustep-base-1_24.dll to name a few of them. But, I found all of these files present under the /GNUstep/System/Tools folder. When I copied these dll files to my main working (home) directory, it runs successfully without any errors.
Why is this happening? All the tutorials I found on the internet shows very simply the compiling and running of Objective-C programs in Windows without changing so many things. Am I missing something? I have searched many times in StackOverflow and also on the internet, but none of those solved this problem. Please help me and thanks in advance.
P.S. - I have installed GNUstep in the default C:/GNUstep/ folder and included the C:/GNUstep/bin/ and C:/GNUstep/msys/1.0/bin/ folders in the PATH environment variable.
I noticed that there are more than one gcc.exe files present on my system for three different programming language compilers and their parent folders are included in the PATH environment variable. So, the gcc command conflicted with those three executables and therefore, the path to the dll files become invalid.
So, I had to move the GNUstep's bin directory to the top of the PATH environment variable to ensure that the GNUstep's gcc executable is used. And now, everything works like a charm.
I am trying to setup a project based on CMake with QtCreator.
In Projects I defined the Build Steps I need.
In the Build setting I get constantly the error message:
Failed to activate protocol version: "CMAKE_GENERATOR" is set but incompatible with configured generator value
I tried to browse on the Internet for this problem but I could not get rid of this error.
If now I however try to build my project specifying a target, my compile steps are not executed, instead, I get the following message:
Running "/usr/local/bin/cmake -E server --pipe=/tmp/cmake-W2VOXm/socket --experimental" in xxxx/.Build/release.
CMake Project parsing failed.
Parsing of CMake project failed: Connection to CMake server lost.
Restarting QtCreator does not help, each time the project is opened the message happens again.
Make sure the build directory it's in the same directory than your projects is, like this:
I got a similar error and have fixed it.
Try to reinstall cmake in Ubuntu by follwing https://cgold.readthedocs.io/en/latest/first-step/installation.html#ubuntu.
Configurate Tools - Options - build & run regarding "cmake" and "kits". Make sure that one of the configurations (auto-detected or maunal) is corrected.
restart qt creator, open project and "run cmake" again.
I have seen and resolved this issue previously by just deleting the build folder, reloading qtcreator and rerunning cmake.
So I'm attempting my first Chrome build just for fun and I've gotten all the files I want through gclient config and sync. However, there are no project files that VS can open, just a bunch of .gyp files that are useless to me.
The command 'gclient runhooks --force' is supposed to generate the sln files for me, but when I run it I get nothing. Not even an error.
What's up?
Thanks.
Yes, this info still seems to be missing from the Chromium documentation at the moment. The way to generate your Visual Studio Solution files is:
export GYP_GENERATORS=msvs-ninja
gclient runhooks --force
You won't need the --force if it's your first time calling gclient runhooks. The generator should be good for your ninja build and it should generate your .sln files.
Yes, really annoying problem... I did all kinds of stuff to make it work, and this is how I made it work in the end, believe it or not:
Restart PC
In terminal cd to the dir containing .gclient file
checkout Important note below if you never used GYP before
gclient runhooks --force
profit
Important: You must also set environment variable named GYP_GENERATORS to a value listing build project types. For example, to generate NINJA build files and Microsoft Visual Studio (your case) do this if in linux terminal export GYP_GENERATORS=ninja,msvs or if Windows cmd setx GYP_GENERATORS ninja,msvs /M before step 4. This way you control what project types will be generated on runhooks.