I seem to be having an issue with macOS SDK headers on the command line after upgrading to Xcode 10. I know Apple added macOS_SDK_headers_for_macOS_10.14.pkg in /Library/Developer/CommandLineTools/Packages, which I have installed - but unfortunately that doesn't seem to have helped. Are there any other changes in Xcode 10 I may have missed?
Here is the log:
20:54.19 In file included from /Users/<user>/Workspace/modules/brotli/enc/backward_references.cc:9:
20:54.19 /Users/<user>/Workspace/modules/brotli/enc/./backward_references.h:12:10: fatal error: 'vector' file not found
20:54.19 #include <vector>
20:54.19 ^~~~~~~~
20:54.23 1 error generated.
20:54.23 make[5]: *** [host_backward_references.o] Error 1
20:54.23 make[4]: *** [modules/brotli/host] Error 2
20:54.23 make[4]: *** Waiting for unfinished jobs....
I encountered this after upgrading to Xcode 10 on a project that depends on libstdc++ (and for reasons not relevant to the present discussion, cannot be upgraded to libc++).
Since Xcode 10 removes support for libstdc++, I had to copy the relevant assets from an old installation of Xcode 9. (Thankfully I had an old machine handy to do so.)
I had to take the libstdc++.6.0.9.tbd binary (and recreate the symlinks libstdc++.6.tbd and libstdc++.tbd pointing to it) from:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
into the same place on the new, Xcode 10 machine.
In addition, I had to copy over the C++ headers at:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/
Related
I cloned the latest version of the Poco libraries source code on to my Mac and attempted to build it per the instructions using CMake. Everything proceeded fine until it reached a point where it was trying to link the libPocoCrypt.dylib library. Even though the C++ compilation worked with out error, the link resulted in the following output
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /usr/lib/libcrypto.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libPocoCrypto.80.dylib] Error 1
make[1]: *** [Crypto/CMakeFiles/Crypto.dir/all] Error 2
make: *** [all] Error 2
Doing some research, I discovered that Apple doesn't want applications linking against its libcrypto library and thus, the resulting error messages. The question then is, what do I need to do here to make this work?
I have recently purchased an M1 MacBook Pro and I am having issues installing valgrind on macOS Big Sur.
What I have tried so far is:
brew install valgrind which pops the error (brew is updated)
Error: invalid attribute for formula 'valgrind': version (nil)
edited head as indicated here
download manually from GitHub following all indications listed but I get
Last 15 lines from /Users/homeuser/Library/Logs/Homebrew/valgrind/03.make:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_status.h:254:9: error: unknown type name '_STRUCT_X86_DEBUG_STATE64'
typedef _STRUCT_X86_DEBUG_STATE64 x86_debug_state64_t;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_status.h:260:9: error: unknown type name '_STRUCT_X86_PAGEIN_STATE'
typedef _STRUCT_X86_PAGEIN_STATE x86_pagein_state_t;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/i386/thread_status.h:266:9: error: unknown type name '_STRUCT_X86_INSTRUCTION_STATE'
typedef _STRUCT_X86_INSTRUCTION_STATE x86_instruction_state_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [fixup_macho_loadcmds] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
looked into this older fix that used to work
Unfortunately none of the methods work so I would really appreciate a solve to this problem as I need to use valgrind on a daily basis for university homework.
Definitive answer. See the configure.ac autoconf file for the exact details. Starting from line 5021 [which may change in future versions, obviously] there is a switch on the kernel versions.
The last version of macOS officially supported by Valgrind was 10.13 on Intel. Neither macOS 11/12 (any architecture) nor ARM are supported.
Getting Valgrind to work on macOS 11/12 ARM hardware would require
filling in all of the gaps from 10.13 to 11/12
ARM assembly code for low level functions like syscalls
There is Linux ARM support, so the second point might not be so difficult. I don't have an ARM based mac, so I'm not vounteering for the moment.
I'm a complete newb when it comes to compiled languages, I'm a web developer. But I need to build a C++ library.
I'm using OSX 10.9 with homebrew. The library's dependancies are Qt5, openCV, openBR... I managed to get that all running. Installed Qt5.2 beta from the official page, I built openCV and openBR myself from sources.
Now this final application throws this, when I try to make it:
ld: library not found for -lQt5Concurrent
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libfacedet.dylib] Error 1
make[1]: *** [CMakeFiles/facedet.dir/all] Error 2
make: *** [all] Error 2
What the hell is lQt5Concurrent? There's no such lib installed on my system. I tried to find it, the only files that have concurrent in their name are header files in Qt's directory
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrent_global.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentcompilertest.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentexception.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentfilter.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentfilterkernel.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentfunctionwrappers.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentiteratekernel.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentmap.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentmapkernel.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentmedian.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentreducekernel.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentrun.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentrunbase.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentstoredfunctioncall.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentthreadengine.h
/Users/ellmo/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtConcurrent.framework/Versions/5/Headers/qtconcurrentversion.h
I have no idea how to get the proper Qt5 devlibs and where to link them.
The author of the application in question cannot help me, as he has no experience with OSX. He said he built this with no problem on Ubuntu.
I also don't think I can show you much of the code, as the application is proprietary.
Please help.
A suggestion from http://qt-project.org/forums/viewthread/22998
In your .pro file, add: LIBS += -lQt5Concurrent
There are a few other suggestions at that link as well, but I believe the one I mention is all I had to do.
I'm using https://github.com/DHowett/theos to implement a tweak for jailbroken iphone.
I followed http://brandontreb.com/beginning-jailbroken-ios-development-getting-the-tools/ and everything worked fine.
Then I upgrade my Xcode to 4.5.
Then when compiling any tweak projects, even a hello world project, it failed with following error:
Making all for tweak PreferenceLoader...
Preprocessing Tweak.xm...
Compiling Tweak.xm...
Linking tweak PreferenceLoader...
collect2: ld terminated with signal 6 [Abort trap: 6]
ld(8724,0x7fff78fd2960) malloc: *** error for object 0x7f89b35003f0: pointer being freed was not allocated
*** set a breakpoint in mallocerror_break to debug
make[2]: *** [obj/PreferenceLoader.dylib] Error 1
make[1]: *** [internal-library-all] Error 2
make: *** [PreferenceLoader.all.tweak.variables] Error 2
I found this http://iphonesdkdev.blogspot.jp/2012/06/how-to-install-thoes-under-xcode-44.html, followed all steps, but still no luck.
Any ideas on the linking tool's crash?
got feedback from https://github.com/DHowett/theos/issues/39
Xcode 4.5 ships with two different versions of the same linker. The one used by gcc (which is deprecated) crashes on armv6 output, and the one used by clang can not generate armv6 output.
There is currently no way to use the 6.0 SDK while targeting iOS versions less than 4.3, or any armv6 platforms.
If you're willing to accept this, please add the following to the top of your Makefile:
export ARCHS=armv7
export TARGET=iphone:latest:4.3
(note from theiostream)
Alternatively, it is possible to use older SDKs and build for both architectures and older deployment targets (up from 3.0). Just force them (if they exist on your Xcode Developer directory), as:
export ARCHS = armv6 armv7
export TARGET=iphone::
I am trying to compile PJSip for iPhoneSDK 5.1. I am running Lion 1.7.3 and Xcode 4.3.3. I did not find any helpful information about compiling it. I am not even sure it's got support for the iphonesdk 5.1. I didn't get any information about it on the project's website. I am not sure if something changed in the compiler from the last iPhoneSDK release but these are the errors i'm getting
I followed the steps on the project's website I change the config_site.h added the lines
#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>
Then moved the header to the location pjlib/include/pj/
I the configure-iphone file i've change the line
./aconfigure --host=arm-apple-darwin9 --disable-floating-point --disable-sdl $*
to
./aconfigure --host=arm-apple-darwin10 --disable-floating-point --disable-sdl $*
sow it would compile for iPhoneSDK 5.1
when i rune the configure-iphone everything i get no errors but when i run make sep i get this errors at samples.mak
make -f Samples.mak depend
make[2]: Nothing to be done for `depend'.
and while running make
"_pjsua_aud_subsys_start", referenced from:
_pjsua_media_subsys_start in libpjsua-arm-apple-darwin10.a(pjsua_media.o)
"_pjsua_vid_subsys_start", referenced from:
_pjsua_media_subsys_start in libpjsua-arm-apple-darwin10.a(pjsua_media.o)
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
make[2]: * [../bin/pjsua-arm-apple-darwin10] Error 1
make[1]: * [pjsua] Error 2
make: * [all] Error 1
Did anybody solve this problem , or can provide a solution to compile Pjsip for iphonesdk5.1 whit Xcode 4.3.3.
type ./configure-iphone in terminal at your pjsip directory
remember to install command-line tool via Xcode
when configure is done
try to make dep && make clean && make