I am trying to build GridLabD on my mac, but get a range or warnings and errors at the step "% make -j8". It is a long log, but below is how it starts (couldn't find gridlabd tag). I followed steps in Is it possible to run GridLab-D on macOS Catalina?, but got the same error at the "make" command. I appreciate any help.
% make -j8
/bin/bash -c "source utilities/build_number . gldcore/build.h"
Updating gldcore/build.h: revision 19053 (d7f83006:develop:Mod)
/Users/hei06j/Documents/repositories/remote/gridlab-d
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
CXX gldcore/gridlabd-convert.o
CC gldcore/gridlabd-instance_slave.o
CC gldcore/gridlabd-interpolate.o
CXX gldcore/gridlabd-job.o
CC gldcore/gridlabd-kml.o
CC gldcore/gridlabd-legal.o
CC gldcore/gridlabd-linkage.o
CXX gldcore/gridlabd-link.o
CC gldcore/gridlabd-load.o
CC gldcore/gridlabd-loadshape.o
CXX gldcore/gridlabd-load_xml.o
CXX gldcore/gridlabd-load_xml_handle.o
CC gldcore/gridlabd-local.o
CXX gldcore/gridlabd-lock.o
CC gldcore/gridlabd-main.o
CC gldcore/gridlabd-match.o
CC gldcore/gridlabd-matlab.o
CC gldcore/gridlabd-module.o
CC gldcore/gridlabd-object.o
CC gldcore/gridlabd-output.o
CC gldcore/gridlabd-property.o
CC gldcore/gridlabd-random.o
CC gldcore/gridlabd-realtime.o
CXX gldcore/gridlabd-sanitize.o
CC gldcore/gridlabd-save.o
CC gldcore/gridlabd-schedule.o
CC gldcore/gridlabd-server.o
CXX gldcore/gridlabd-setup.o
In file included from gldcore/load_xml.cpp:15:
In file included from ./gldcore/platform.h:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:309:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:420:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37:
./version:1:3: error: invalid preprocessing directive
# $Id: VERSION 858 2008-08-28 21:06:13Z d3g637 $
^
./version:2:1: error: C++ requires a type specifier for all declarations
MAJOR=3
^
./version:2:8: error: expected ';' after top level declarator
MAJOR=3
^
In file included from gldcore/convert.cpp:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:309:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:420:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37:
./version:1:3: error: invalid preprocessing directive
# $Id: VERSION 858 2008-08-28 21:06:13Z d3g637 $
^
./version:2:1: error: C++ requires a type specifier for all declarations
MAJOR=3
^
In file included from gldcore/load_xml_handle.cpp:18:
In file included from ./gldcore/platform.h:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:309:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:420:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37:
./version:./version1::32:: 8: error: error: invalid preprocessing directive
expected ';' after top level declarator
MAJOR=3
^
# $Id: VERSION 858 2008-08-28 21:06:13Z d3g637 $
^
./version:2:1: error: C++ requires a type specifier for all declarations
MAJOR=3
^
./version:2:8: error: expected ';' after top level declarator
MAJOR=3
^
In file included from gldcore/setup.cpp:4:
In file included from ./gldcore/gridlabd.h:91:
In file included from ./gldcore/platform.h:57:
In file included from
...
I'm trying to compile an iOS project that contains ARM code using the command line.
Here is the command line:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as -arch armv6 engines/scumm/smush/codec47ARM.s -o engines/scumm/smush/codec47ARM.o
...and here are the errors:
engines/scumm/smush/codec47ARM.s:29:Unknown pseudo-op: .global
engines/scumm/smush/codec47ARM.s:29:Rest of line ignored. 1st junk character valued 95 (_).
engines/scumm/smush/codec47ARM.s:43:bad instruction `STMFD r13!,{r2,r4-r11,R14}'
engines/scumm/smush/codec47ARM.s:45:bad instruction `LDR r4,[r13,#40]'
engines/scumm/smush/codec47ARM.s:48:bad instruction `SUB r4,r4,#0xF8'
engines/scumm/smush/codec47ARM.s:55:bad instruction `ADD r7,r2,#7'
engines/scumm/smush/codec47ARM.s:56:bad instruction `MOV r7,r7,LSR#3'
If I try to compile with gcc (or clang), I receive the following errors:
engines/scumm/smush/codec47ARM.s:162:2: error: invalid instruction
LDREQB r6,[r1],#1 # r6 = t = *_d_src++
^
engines/scumm/smush/codec47ARM.s:279:2: error: invalid instruction
LDREQB r6,[r1],#1 # r6 = t = *_d_src++
^
engines/scumm/smush/codec47ARM.s:330:2: error: invalid instruction
LDRLTB r6,[r4,r6] # r6 = t = _paramPtr[code]
^
What am I doing wrong? I believe that ARMv6 should support MOV, ADD, etc.
I'm installing Passenger on Mac OSX (10.9.5) and have been getting errors. If it matters, Ruby 2.1.2 is installed through rbenv and I have Rails 4.0.0 installed. Per the 'Agile Web Development with Rails 4' book I'm installing Passenger version 4.0.8. After typing the command
> sudo passenger-install-apache2-module
in Terminal it takes me through some prompts for the installation process and then I get the following error section
In file included from ext/common/Logging.cpp:31:
In file included from ext/common/Utils/IOUtils.h:39:
ext/common/FileDescriptor.h:99:2: error: unknown type name 'shared_ptr'
shared_ptr<SharedData> data;
^
ext/common/FileDescriptor.h:99:12: error: expected member name or ';' after declaration specifiers
shared_ptr<SharedData> data;
~~~~~~~~~~^
ext/common/FileDescriptor.h:126:4: error: use of undeclared identifier 'data'
data = make_shared<SharedData>(fd, autoClose);
^
ext/common/FileDescriptor.h:145:7: error: use of undeclared identifier 'data'; did you mean
'StaticString::data'?
if (data != NULL) {
^~~~
StaticString::data
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here
const char *data() const {
^
In file included from ext/common/Logging.cpp:31:
In file included from ext/common/Utils/IOUtils.h:39:
ext/common/FileDescriptor.h:145:7: error: call to non-static member function without an object
argument
if (data != NULL) {
^~~~
ext/common/FileDescriptor.h:146:4: error: use of undeclared identifier 'data'; did you mean
'StaticString::data'?
data->close(checkErrors);
^~~~
StaticString::data
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here
const char *data() const {
^
In file included from ext/common/Logging.cpp:31:
In file included from ext/common/Utils/IOUtils.h:39:
ext/common/FileDescriptor.h:146:4: error: call to non-static member function without an object
argument
data->close(checkErrors);
^~~~
ext/common/FileDescriptor.h:147:4: error: use of undeclared identifier 'data'; did you mean
'StaticString::data'?
data.reset();
^~~~
StaticString::data
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here
const char *data() const {
^
In file included from ext/common/Logging.cpp:31:
In file included from ext/common/Utils/IOUtils.h:39:
ext/common/FileDescriptor.h:147:4: error: call to non-static member function without an object
argument
data.reset();
^~~~
ext/common/FileDescriptor.h:160:7: error: use of undeclared identifier 'data'; did you mean
'StaticString::data'?
if (data != NULL) {
^~~~
StaticString::data
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here
const char *data() const {
^
In file included from ext/common/Logging.cpp:31:
In file included from ext/common/Utils/IOUtils.h:39:
ext/common/FileDescriptor.h:160:7: error: call to non-static member function without an object
argument
if (data != NULL) {
^~~~
ext/common/FileDescriptor.h:161:13: error: use of undeclared identifier 'data'; did you mean
'StaticString::data'?
int fd = data->fd;
^~~~
StaticString::data
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here
const char *data() const {
^
In file included from ext/common/Logging.cpp:31:
In file included from ext/common/Utils/IOUtils.h:39:
ext/common/FileDescriptor.h:161:13: error: call to non-static member function without an object
argument
int fd = data->fd;
^~~~
ext/common/FileDescriptor.h:162:4: error: use of undeclared identifier 'data'; did you mean
'StaticString::data'?
data->detach();
^~~~
StaticString::data
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here
const char *data() const {
^
In file included from ext/common/Logging.cpp:31:
In file included from ext/common/Utils/IOUtils.h:39:
ext/common/FileDescriptor.h:162:4: error: call to non-static member function without an object
argument
data->detach();
^~~~
ext/common/FileDescriptor.h:163:4: error: use of undeclared identifier 'data'; did you mean
'StaticString::data'?
data.reset();
^~~~
StaticString::data
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here
const char *data() const {
^
In file included from ext/common/Logging.cpp:31:
In file included from ext/common/Utils/IOUtils.h:39:
ext/common/FileDescriptor.h:163:4: error: call to non-static member function without an object
argument
data.reset();
^~~~
ext/common/FileDescriptor.h:177:7: error: use of undeclared identifier 'data'; did you mean
'StaticString::data'?
if (data == NULL) {
^~~~
StaticString::data
ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here
const char *data() const {
^
In file included from ext/common/Logging.cpp:31:
In file included from ext/common/Utils/IOUtils.h:39:
ext/common/FileDescriptor.h:177:7: error: call to non-static member function without an object
argument
if (data == NULL) {
^~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
rake aborted!
Command failed with status (1): [g++ -Iext -Iext/common -Iext/libev -Wno-ambiguous-member-template -fPIC -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<ext/hash_map>" -DHASH_MAP_CLASS="hash_map" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -ggdb -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -o buildout/apache2/module_libpassenger_common/Logging.o -c ext/common/Logging.cpp]
/Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/build/cplusplus_support.rb:51:in `run_compiler'
/Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/build/cplusplus_support.rb:61:in `compile_cxx'
/Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/lib/phusion_passenger/common_library.rb:133:in `block (2 levels) in define_category_tasks'
Tasks: TOP => apache2 => buildout/apache2/mod_passenger.so => buildout/apache2/module_libpassenger_common/Logging.o
(See full trace by running task with --trace)
--------------------------------------------
It looks like something went wrong
Please read our Users guide for troubleshooting tips:
/Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/doc/Users guide Apache.html
If that doesn't help, please use our support facilities at:
https://www.phusionpassenger.com
We'll do our best to help you.
I've looked through the documentation like it suggested but can't seem to find what could cause these errors. I've also looked online with the same result. Any idea what could cause this? How should I fix it?
I think you're using too outdated version of passenger. Try install it from http://brew.sh/. https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#install_osx_homebrew
I'm trying to build a C library (GMP 6.0.0) for arm64 for use on iOS. I'm running the configure script with the invocation below (compiler is as found using xcrun --find).
./configure \
CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" \
CPP="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -E" \
CPPFLAGS="-target arm64-apple-darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -miphoneos-version-min=7.0" \
--host=aarch64-apple-darwin
However this fails at the following line ("long long reliability test 1"):
checking compiler /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -O2 -pedantic -target arm64-apple-darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -miphoneos-version-min=7.0... no, long long reliability test 1
configure: error: could not find a working compiler, see config.log for details
Full config.log available here. It shows multiple warning and errors for the long long reliability test compile, including the following:
conftest.c:9:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
^
conftest.c:10:44: error: implicit declaration of function 'h' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
^
conftest.c:10:48: error: implicit declaration of function 'g' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
^
conftest.c:10:100: warning: control reaches end of non-void function [-Wreturn-type]
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
^
Using --host=none it works fine, but I'd really like to figure out how to build it with assembly optimized for arm64.
My system is x86_64-apple-darwin13.1.0 (or coreisbr-apple-darwin13.1.0 according to config.guess), an early '11 Core i7 MBP running OS X v10.9.2. I'm using Xcode 5.1 (5B130a).
Any help appreciated.
EDIT 1
Compiling for ARMv7 passes configure, but fails on make (full configure/make output here), apparently while compiling some assembly:
tmp-dive_1.s:165:18: error: unexpected token in '.section' directive
.section .rodata
^
EDIT 2
#MarcGlisse: By forcing clang to ignore the errors as suggested (-Wno-...) arm64 passes configure, but then fails on make (full output here):
tmp-mul_1.s:59:2: error: unrecognized instruction mnemonic
bcc Lfi1
^
tmp-mul_1.s:60:2: error: unrecognized instruction mnemonic
beq Lfi2
^
As a side note: these commits, I assume intended to remove the need for suppressing the error, don't seem to work i.e. I get the same error when removing the supression.
For armv7, using these commits as suggested fixes the .section error, but make fails later on with the following (full output here):
tmp-mode1o.s:64:2: error: unknown directive
.protected ___gmp_binvert_limb_table
^
EDIT 3
Using the suggested edits, armv7, armv7s, i386 and x86_64 now all compile with assembly!
For arm64 the edits get it past the previous error, but now gives several errors about an invalid input constraint 'rZ', all in the same file (full output here):
divrem_1.c:237:5: error: invalid input constraint 'rZ' in asm
udiv_qrnnd_preinv (*qp, r, r, nshift, d, dinv);
^
../gmp-impl.h:3062:2: note: expanded from macro 'udiv_qrnnd_preinv'
add_ssaaaa (_qh, _ql, _qh, _ql, (nh) + 1, (nl)); \
^
../longlong.h:551:7: note: expanded from macro 'add_ssaaaa'
: "rZ" (ah), "rZ" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
EDIT 4
After commenting out add_ssaaaa and sub_ddmmss in longlong.h and editing some more assembly instructions in gcd_1.asm (blo to b.lo etc.), it now fails with several of the following errors (full output here):
tmp-invert_limb.s:75:22: error: immediate value expected for shifter operand
add x1, x1, x2, lsr 1
^
tmp-invert_limb.s:75:22: error: invalid operand for instruction
add x1, x1, x2, lsr 1
^
I'll post a total diff later.
EDIT 5
Ok, that gets us another step further, but it now hits into (full output here):
tmp-invert_limb.s:52:2: error: ADR/ADRP relocations must be GOT relative
adrp x1, approx_tab
^
If this keeps going it might be better to continue this via email.
"Support for ARM64 alias Aarch64 alias ARMv8"
https://gmplib.org/gmp6.0
Copyright issues aside...
GMP may not be compatible with Apple's proprietary CPU, and may not be compatible with Clang/LLVM. Being a GNU project it is probably more thoroughly tested with GCC on non-proprietary chipsets.
A quick search shows historically at least there have been issues compiling GMP with clang.
You really should email the GMP community and ask for help on this one.
Guys
I'm trying to build OpenCV2 on OS X 10.8.3 under this official installation guide.
The configure step works fine:
cmake -D:CMAKE_BUILD_TYPE=RELEASE ..
But when i build it with make:
make -j 8
There turns out lots of Object-C errors like this:
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:260: error: expected ';' before '__attribute__'
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:261: error: expected ':' before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:261: error: expected type-specifier before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:261: error: expected ')' before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:261: error: expected identifier before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:261: error: expected ';' before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:262: error: expected ';' before '__attribute__'
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:52,
from /System/Library/Frameworks/QTKit.framework/Headers/QTError.h:8,
from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:11,
from /Users/kuankuan/Desktop/RoysData/Workspace/opencv/opencv-2.4.5/modules/highgui/src/cap_qtkit.mm:34:
/System/Library/Frameworks/Foundation.framework/Headers/NSPointerArray.h:57: error: expected ';' before '__attribute__'
/System/Library/Frameworks/Foundation.framework/Headers/NSPointerArray.h:58: error: expected ';' before '__attribute__'
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:54,
from /System/Library/Frameworks/QTKit.framework/Headers/QTError.h:8,
from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:11,
from /Users/kuankuan/Desktop/RoysData/Workspace/opencv/opencv-2.4.5/modules/highgui/src/cap_qtkit.mm:34:
/System/Library/Frameworks/Foundation.framework/Headers/NSPort.h:68: error: expected constructor, destructor, or type conversion before '-' token[ 42%]
/System/Library/Frameworks/Foundation.framework/Headers/NSPort.h:115: error: expected constructor, destructor, or type conversion before '-' token
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:57,
I have installed XCode and xcode command line tool. How can i deal with this issue ? i'm going to use opencv under c++.
Many thanks !