I am trying to build AOSP on on OS X 10.7.5, with Xcode 4.2.1 and I get the error:
host C++: libutils <= system/core/libutils/Printer.cpp
system/core/libutils/Printer.cpp: In member function ‘virtual void android::FdPrinter::printLine(const char*)’:
system/core/libutils/Printer.cpp:123: error: ‘dprintf’ was not declared in this scope
make: * [out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/Printer.o] Error 1
However if I myself write a program using the function dprintf it compiles fine, so I guess
my problem is that AOSP compilation uses the wrong compiler / toolchain.
I tried to see what C compiler I have on my machine and I get this:
$ whereis gcc
/usr/bin/gcc
$ ls -al /usr/bin/gcc
lrwxr-xr-x 1 root wheel 12 Dec 16 23:08 /usr/bin/gcc -> llvm-gcc-4.2
I read that llvm is not suported for aosp. Could this be the reason? If this is the case, how can I install another compiler?
I solved the issue upgrading to OS X 10.9 (Mavericks) and XCode.
Related
When I try compile a swift code on linux (in my x64 machine), with the command swift build -c release --arch arm64 I am getting this error:
<unknown>:0: error: could not find module '_Concurrency' for target 'arm64-unknown-linux-gnu'; found: x86_64-unknown-linux-gnu, at: /home/kleber-manjaro/swift-5.5.2-RELEASE-ubuntu20.04/usr/lib/swift/linux/_Concurrency.swiftmodule
Anyone can tell me what is causing this and how to fix it?
The command pgxn install madlib get so many errors at UBUNTU 16 LTS (xenial)... There are a bug with MADLib installation for UBUNTU?
INFO: best version: madlib 1.10.0
INFO: saving /tmp/tmpZPEFvN/madlib-1.10.0.zip
INFO: unpacking: /tmp/tmpZPEFvN/madlib-1.10.0.zip
INFO: running configure
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:14 (project):
The CMAKE_CXX_COMPILER:
sunCC;g++
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
CMake Error at /usr/share/cmake-3.5/Modules/CMakeCXXInformation.cmake:61 (include):
include called with wrong number of arguments. include() only takes one
file.
Call Stack (most recent call first):
CMakeLists.txt:14 (project)
-- Configuring incomplete, errors occurred!
See also "/tmp/tmpZPEFvN/madlib-1.10.0/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/tmpZPEFvN/madlib-1.10.0/build/CMakeFiles/CMakeError.log".
INFO: building extension
make -C build all
make[1]: Entering directory '/tmp/tmpZPEFvN/madlib-1.10.0/build'
make[1]: *** No rule to make target 'all'. Stop.
make[1]: Leaving directory '/tmp/tmpZPEFvN/madlib-1.10.0/build'
Makefile:5: recipe for target 'all' failed
make: *** [all] Error 2
ERROR: command returned 2: make PG_CONFIG=/usr/bin/pg_config all
See also MADlib apt install, how to?
I would like to install portaudio on OSX El Capitan 10.11.
I have downloaded the latest snapshot and tried to install, and I got something about frameworks not being available. I hacked the configure script to help xcodebuild find the framework for 10.11 and now I get: 1
src/hostapi/coreaudio/pa_mac_core_utilities.c:152:10: error: 'kAudioUnitErr_IllegalInstrument' is deprecated [-Werror,-Wdeprecated-declarations]
case kAudioUnitErr_IllegalInstrument:
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AudioUnit.framework/Headers/AUComponent.h:1633:2: note:
'kAudioUnitErr_IllegalInstrument' has been explicitly marked deprecated here
kAudioUnitErr_IllegalInstrument = -10873,
^
src/hostapi/coreaudio/pa_mac_core_utilities.c:155:10: error: 'kAudioUnitErr_InstrumentTypeNotFound' is deprecated [-Werror,-Wdeprecated-declarations]
case kAudioUnitErr_InstrumentTypeNotFound:
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AudioUnit.framework/Headers/AUComponent.h:1634:2: note:
'kAudioUnitErr_InstrumentTypeNotFound' has been explicitly marked deprecated here
kAudioUnitErr_InstrumentTypeNotFound = -10872,
^
2 errors generated.
make: *** [src/hostapi/coreaudio/pa_mac_core_utilities.lo] Error 1
I now understand that is because carbon is no longer available in 10.11.
Is there any way around this, or any way to install the previous frameworks? Or should I be using something else. I want portaudio to work so that I can install playrec and get duplex audio on matlab on a mac.
I have Xcode(4.4.1) installed on my mac, and use MATLAB r2011a (64 bit) on the computer. I have ben trying to compile mex files, but I get the following error:
/Applications/MATLAB_R2011a.app/bin/mex: line 305: gcc-4.2: command not found
/Applications/MATLAB_R2011a.app/bin/mex: line 1041: gcc-4.2: command not found
mex: compile of ' "mdwt.c"' failed.
??? Error using ==> mex at 208
Unable to complete successfully.
Error in ==> compile at 39
mex mdwt.c mdwt_r.c
When I type in "gcc" at the command prompt (terminal) , I see that it has been installed.
Can anyone tell me how to fix this?
You might have to run mex -setup first to tell matlab which compiler is available.
Please check this link:
How to use/install gcc on Mac OS X 10.8 / Xcode 4.4
For xcode 4.4, I guess you need to install gcc manually by yourself.
I know this issue already discussed (include there), and no one time. But, unfortunately, I cannot solve this problem.
So, I have OS X Lion, i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1, and I try to build gcc-4.7.0.
First of all, I've already built this compiler on Debian GNU/Linux, so I was sure any problems will not be...
So, I read this GCC manual and I did all exactly as described:
cd gcc-4.7.0
./contrib/download_prerequisites
cd ..
mkdir gcc_build
cd gcc_build
/Users/dshevchenko/Downloads/gcc-4.7.0/configure --prefix=/Users/dshevchenko/Tools/GCC
make
So, MPC, MPFR and GMP was successfully downloaded, and ./configure was OK. But after few minutes after make I get this error:
checking for suffix of object files... configure: error:
in `/Users/dshevchenko/Downloads/gcc_build/x86_64-apple-darwin11.4.0/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
As I understand this can't be due error of dynamic linking with MPFR, MPC or GMP, because these libs was built inside of GCC source code tree.
In my ~/.bash_profile:
export DYLD_LIBRARY_PATH=/Users/dshevchenko/Tools/GCC/lib
Help me please, I'll be grateful for any advice.
Be sure you have the latest Xcode (4.4 at the time of this writing). There is a bug in the llvm compiler in some versions of Xcode (including 4.1, which I had). For Xcode 4.4, the command line tools must be downloaded from the Xcode preferences.
the follow solution helped me out:
$ export CC="gcc -D_FORTIFY_SOURCE=0”
$ $srcdir/configure ...
$ make
source: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50342