AOSP building error: symbol not defined - android-source

I'm trying to build the cornerstone based on AOSP 4.3_r2.2. I got a lot of errors during the building like these:
frameworks/base/core/res/res/values/public.xml:244: error: Symbol 'config_bluetooth_adapter_quick_switch' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1558: error: Symbol 'config_enableDreams' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:919: error: Symbol 'ic_suggestions_add' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:920: error: Symbol 'ic_suggestions_delete' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1244: error: Symbol 'backspace' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1250: error: Symbol 'carrier' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:130: error: Symbol 'dangerous_perms_list' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1253: error: Symbol 'emergencyCallButton' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1254: error: Symbol 'faceLockAreaView' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1256: error: Symbol 'forgotPatternButton' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1258: error: Symbol 'headerText' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1260: error: Symbol 'instructions' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1263: error: Symbol 'lockPattern' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:131: error: Symbol 'non_dangerous_perms_list' declared with <java-symbol> not defined
...
make: *** [out/target/common/obj/APPS/framework-res_intermediates/package-export.apk] Error 1
make: *** Deleting file `out/target/common/obj/APPS/framework-res_intermediates/package-export.apk'
make: *** Waiting for unfinished jobs....
I searched here and found this issue. So I know this could be missing the symbol definition problem. But when I look at the public.xml, I see they belong to different types like these:
<java-symbol type="bool" name="config_bluetooth_sco_off_call" />
<java-symbol type="bool" name="config_enableDreams" />
<java-symbol type="drawable" name="ic_suggestions_add" />
<java-symbol type="drawable" name="ic_suggestions_delete" />
<java-symbol type="id" name="backspace" />
<java-symbol type="id" name="carrier" />
<java-symbol type="id" name="dangerous_perms_list" />
...
I also found there's a script file at frameworks/base/core/res/MakeJavaSymbols.sed, it says the command
make framework 2>&1 | sed -n -f MakeJavaSymbols.sed | sort -u
can be used to generate the missing resources. I searched a lot, all I found just to run this command, and it'll output the missing parts. But I ran it, nothing happened. So my question is where and how should I add these missing symbols? There are hundreds of them, do I need to add them manually? Did I missed something? Since I'm new in AOSP framework, so please help.

Finally resolved the problem, by did these:
1. Removed the symbol definition from public.xml;
2. Replaced android.view.Surface with android.view.SurfaceControl, and WindowManagerService.DEFAULT_DIM_DURATION with WindowAnimator.DEFAULT_DIM_DURATION.
After that, I compile it succeed, and it can be run, although there still have some problems.

Related

Building a statically linked executable with Swift on Ubuntu

I'm trying to build an statically linked executable from a swift source on Ubuntu.
Calling
swift build -Xswiftc -static-stdlib
as suggested in Compile Swift script with static Swift core library
returns this error:
/usr/bin/ld.gold: error: cannot find -lFoundation
Some educated guesses:
Researching this hasn't led me very far, I know it means the library can't be found. Maybe it isn't in the compiler's path ?
Full error message:
user#user-VirtualBox:/path/to/project$ swift build -Xswiftc -static-stdlib
Compile Swift Module 'projectName' (4 sources)
Linking ./.build/debug/projectName
/usr/bin/ld.gold: error: cannot find -lFoundation
/usr/bin/ld.gold: error: cannot find -lFoundation
/usr/bin/ld.gold: error: cannot find -lFoundation
/usr/bin/ld.gold: error: cannot find -lFoundation
/path/to/project/Sources/SomeClass_1.swift:67: error: undefined reference to '_TMaC10Foundation17JSONSerialization'
/path/to/project/Sources/SomeClass_1.swift:67: error: undefined reference to '_TFVC10Foundation17JSONSerialization14WritingOptionsau13prettyPrintedS1_'
/path/to/project/Sources/SomeClass_1.swift:68: error: undefined reference to '_TMaC10Foundation8NSString'
/path/to/project/Sources/SomeClass_1.swift:68: error: undefined reference to '_TFVE10FoundationSS8Encodingau4utf8S0_'
/path/to/project/Sources/SomeClass_1.swift:68: error: undefined reference to '_TFC10Foundation8NSStringCfT4dataVS_4Data8encodingSu_GSqS0__'
/path/to/project/Sources/SomeClass_1.swift:69: error: undefined reference to '_TWPC10Foundation8NSObjects9EquatableS_'
/path/to/project/Sources/SomeClass_1.swift:72: error: undefined reference to '_TFC10Foundation8NSStringCfT13stringLiteralVs12StaticString_S0_'
/path/to/project/Sources/SomeClass_1.swift:76: error: undefined reference to '_TMaC10Foundation8NSString'
/path/to/project/Sources/SomeClass_1.swift:76: error: undefined reference to '_TFC10Foundation8NSStringCfT13stringLiteralVs12StaticString_S0_'
/path/to/project/Sources/SomeClass_2.swift:73: error: undefined reference to '_TMaC10Foundation17JSONSerialization'
/path/to/project/Sources/SomeClass_2.swift:73: error: undefined reference to '_TFVC10Foundation17JSONSerialization14WritingOptionsau13prettyPrintedS1_'
/path/to/project/Sources/SomeClass_2.swift:74: error: undefined reference to '_TMaC10Foundation8NSString'
/path/to/project/Sources/SomeClass_2.swift:74: error: undefined reference to '_TFVE10FoundationSS8Encodingau4utf8S0_'
/path/to/project/Sources/SomeClass_2.swift:74: error: undefined reference to '_TFC10Foundation8NSStringCfT4dataVS_4Data8encodingSu_GSqS0__'
/path/to/project/Sources/SomeClass_2.swift:75: error: undefined reference to '_TWPC10Foundation8NSObjects9EquatableS_'
/path/to/project/Sources/SomeClass_2.swift:78: error: undefined reference to '_TFC10Foundation8NSStringCfT13stringLiteralVs12StaticString_S0_'
/path/to/project/Sources/SomeClass_2.swift:82: error: undefined reference to '_TMaC10Foundation8NSString'
/path/to/project/Sources/SomeClass_2.swift:82: error: undefined reference to '_TFC10Foundation8NSStringCfT13stringLiteralVs12StaticString_S0_'
/path/to/project/Sources/SomeClass_3.swift:106: error: undefined reference to '_TMaC10Foundation17JSONSerialization'
/path/to/project/Sources/SomeClass_3.swift:106: error: undefined reference to '_TFVC10Foundation17JSONSerialization14WritingOptionsau13prettyPrintedS1_'
/path/to/project/Sources/SomeClass_3.swift:107: error: undefined reference to '_TFVE10FoundationSS8Encodingau4utf8S0_'
/path/to/project/Sources/SomeClass_3.swift:107: error: undefined reference to '_TFC10Foundation8NSStringCfT4dataVS_4Data8encodingSu_GSqS0__'
/path/to/project/Sources/SomeClass_3.swift:108: error: undefined reference to '_TWPC10Foundation8NSObjects9EquatableS_'
/path/to/project/Sources/main.swift:24: error: undefined reference to '_TMaC10Foundation12NSDictionary'
/path/to/project/Sources/main.swift:24: error: undefined reference to '_TFC10Foundation12NSDictionaryCft17dictionaryLiteralGSaTP_P____S0_'
/path/to/project/Sources/main.swift:51: error: undefined reference to '_TMaC10Foundation12NSDictionary'
/path/to/project/Sources/main.swift:51: error: undefined reference to '_TFC10Foundation12NSDictionaryCft17dictionaryLiteralGSaTP_P____S0_'
/path/to/project/Sources/main.swift:99: error: undefined reference to '_TMaC10Foundation12NSDictionary'
/path/to/project/Sources/main.swift:99: error: undefined reference to '_TFC10Foundation12NSDictionaryCft17dictionaryLiteralGSaTP_P____S0_'
/path/to/project/Sources/main.swift:112: error: undefined reference to '_TMaC10Foundation12NSDictionary'
/path/to/project/Sources/main.swift:112: error: undefined reference to '_TFC10Foundation12NSDictionaryCft17dictionaryLiteralGSaTP_P____S0_'
/path/to/project/Sources/main.swift:167: error: undefined reference to '_TMaC10Foundation17JSONSerialization'
/path/to/project/Sources/main.swift:167: error: undefined reference to '_TFVC10Foundation17JSONSerialization14WritingOptionsau13prettyPrintedS1_'
/path/to/project/Sources/main.swift:168: error: undefined reference to '_TFVE10FoundationSS8Encodingau4utf8S0_'
/path/to/project/Sources/main.swift:168: error: undefined reference to '_TFC10Foundation8NSStringCfT4dataVS_4Data8encodingSu_GSqS0__'
/path/to/project/Sources/main.swift:169: error: undefined reference to '_TWPC10Foundation8NSObjects9EquatableS_'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /path/to/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/swift-build-tool -f /path/to/project/.build/debug.yaml
The problem is that Foundation is not available as static library. There is an open bug for this:
https://bugs.swift.org/browse/SR-2205
You might be able to work around this problem if you could build a static Foundation lib, e.g. as part of building Swift from source.

Error when deploying Swift Application On Bluemix error: hidden symbol Foundation Operations

I am trying to deploy an application on BlueMix. I can run the application locally on my computer, but cannot deploy it on BlueMix.
I believe the error is being caused by some Library or function under a library that is missing. Looking at the trace it is probably Foundation.OperationsDispatch.
How can I include the missing library or fix the above problem.
The error log is the following:
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation12_leaveGroupsfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation6finishfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation15_waitUntilReadyfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_readySb' is not defined locally
swift-build: error: exit(1): /tmp/cache/swift-3.0/swift-3.0-RELEASE-ubuntu14.04/usr/bin/swift-build-tool -f /tmp/staged/app/.build/release.yaml
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation12_leaveGroupsfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation6finishfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation15_waitUntilReadyfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation12_leaveGroupsfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation6finishfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation15_waitUntilReadyfT_T_' is not defined locally
clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
Staging failed: Buildpack compilation step failed
This is a bug in Swift on Linux that was fixed by the following commit:
https://github.com/apple/swift/commit/fd61338444ac42d8715fd9e637b238e035f17f8d
Unfortunately that didn't make Swift 3.0 GA, but it should be in the latest Swift 3.0.1 Preview.
Does your application subclass Operation?
The linker errors look very similar to those in https://bugs.swift.org/browse/SR-2170. There is a known problem with Swift 3.0 on Linux which prevents subclassing of open classes defined in Foundation because the Foundation library is not being generated with the proper linker visibility for internal members of open classes.

FIWARE- Orion Context Broker

I tried to install Orion context Broker on Ubuntu 14.04 with Alien but when I do contextBroker start it says:
contextBroker: error while loading shared libraries: libboost_thread-mt.so.5: cannot open shared object file: No such file or directory
I couldn't find where is the error then I tried to install with all the dependencies from the instructions in Git, but when I try to do the make it makes an error:
[ 26%] Building CXX object src/lib/serviceRoutines/CMakeFiles/serviceRoutines.dir/exitTreat.cpp.o
In file included from /home/sistemas/fiware-orion-develop/src/lib/serviceRoutines/exitTreat.cpp:32:0:
/home/sistemas/fiware-orion-develop/src/lib/mongoBackend/MongoGlobal.h:30:35: fatal error: mongo/client/dbclient.h: No existe el archivo o el directorio
#include "mongo/client/dbclient.h"
I have the mongo's driver installed, how can I solve this?
Finally I compile a new driver from https://github.com/mongodb/mongo-cxx-driver/releases and it continues compiling until:
*
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp: In function ‘void recoverOnTimeIntervalThread(std::string, mongo::BSONObj&)’:
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:532:40: error: ‘class mongo::OID’ has no member named ‘str’
std::string subId = idField.OID().str();
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp: In function ‘void destroyOnTimeIntervalThread(std::string, mongo::BSONObj&)’:
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:583:40: error: ‘class mongo::OID’ has no member named ‘str’
std::string subId = idField.OID().str();
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp: In function ‘void releaseTriggeredSubscriptions(std::map<std::basic_string<char>, TriggeredSubscription*>&)’:
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:17: error: ‘string’ was not declared in this scope
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:17: note: suggested alternative:
In file included from /usr/include/c++/4.9/iosfwd:39:0,
from /usr/include/boost/smart_ptr/shared_ptr.hpp:49,
from /usr/include/boost/shared_ptr.hpp:17,
from /usr/include/mongo/client/dbclient_rs.h:20,
from /usr/include/mongo/client/dbclient.h:59,
from /home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:27:
/usr/include/c++/4.9/bits/stringfwd.h:62:33: note: ‘std::string’
typedef basic_string<char> string;
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:47: error: template argument 1 is invalid
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:47: error: template argument 3 is invalid
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:47: error: template argument 4 is invalid
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:59: error: invalid type in declaration before ‘it’
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:59: error: expected ‘;’ before ‘it’
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:59: error: ‘it’ was not declared in this scope
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:94: error: expected ‘)’ before ‘;’ token
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:50: error: unused variable ‘iterator’ [-Werror=unused-variable]
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
^
/home/sistemas/fiware-orion/src/lib/mongoBackend/MongoGlobal.cpp:1911:98: error: ‘it’ was not declared in this scope
for (std::map<string, TriggeredSubscription*>::iterator it = subs.begin(); it != subs.end(); ++it)
^
cc1plus: all warnings being treated as errors
make[3]: *** [src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/MongoGlobal.cpp.o] Error 1
make[3]: se sale del directorio «/home/sistemas/fiware-orion/BUILD_RELEASE»
make[2]: *** [src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/all] Error 2
make[2]: *** Se espera a que terminen otras tareas....
[ 88%] Building CXX object src/lib/xmlParse/CMakeFiles/xmlParse.dir/xmlRegisterProviderRequest.cpp.o
*
Is a problem in a file of Orion Context Broker?
I think that it could be a problem with de mongo's driver again but I try to install another one older and it doesn't work. I also think it can be a problem with de -mt libraries that doesn't exist in boost anymore, but nothing that I try until now works.
I've installed Orion CB using Ubuntu 14.04 LTS as host. I've also found some problems with libboost_thread-mt.so libraries. Solved this way:
Get & install packages
boost-thread-1.41.0-25.el6.x86_64.rpm
boost-system-1.41.0-25.el6.x86_64.rpm
boost-filesystem-1.41.0-25.el6.x86_64.rpm
and install them using alien. Then, the libraries were installed in “/usr/lib64” folder. To correct this (and CB is able to locate them): create a .conf file within “/etc/ld.so.conf.d/”, add a line (“/usr/lib64”) within and save it and quit and reload your configuration by calling (“sudo ldconfig”)
Hope this helps
So, here we have two questions in one. Let's start with the first one, about shared library not found:
Ask the broker where the library should be, using "ldd $(which contextBroker) | grep boost_thread).
After running this command, make sure the library is there. If it is not, but you have it elsewhere, you should be able to use the env var LD_LIBRARY_PATH to point to the directory where the library is found.
Now, for the second question, the mongo driver includes are not found. In my machine, I have them in /usr/local/include/mongo => I'm ok with the -I/usr/local/include directive to the compiler.
If you have your mongo driver installed elsewhere, you might need to add another 'include-directory' for the compilation. This would be done in the top-level CMakeLists.txt (I guess using 'include_directories' - I'm far from a cmake expert :-)).
When building, to see detailed information, compile like this:
% CPU_COUNT=1 VERBOSE=1 make install
Post the info again here unless you manage to solve your problems.

Net::SSLeay won't install

cpan Net::SSLeay
Running install for module 'Net::SSLeay'
Running make for M/MI/MIKEM/Net-SSLeay-1.55.tar.gz
Has already been unwrapped into directory /root/.cpan/build/Net-SSLeay-1.55-v9rgJp
Could not make: Unknown error
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
I have installed all libs of this post:
install perl module Net::SSLeay through cpan
I also tryed to install it manually and during make command I had this log:
SSLeay.c:8143: error: declaration for parameter ‘XS_Net__SSLeay_BIO_write’ but no such parameter
SSLeay.c:8110: error: declaration for parameter ‘XS_Net__SSLeay_BIO_read’ but no such parameter
SSLeay.c:8091: error: declaration for parameter ‘XS_Net__SSLeay_BIO_free’ but no such parameter
SSLeay.c:8072: error: declaration for parameter ‘XS_Net__SSLeay_BIO_new’ but no such parameter
SSLeay.c:8053: error: declaration for parameter ‘XS_Net__SSLeay_BIO_new_ssl_connect’ but no such parameter
SSLeay.c:8032: error: declaration for parameter ‘XS_Net__SSLeay_BIO_new_ssl’ but no such parameter
SSLeay.c:8011: error: declaration for parameter ‘XS_Net__SSLeay_BIO_new_file’ but no such parameter
SSLeay.c:7992: error: declaration for parameter ‘XS_Net__SSLeay_BIO_new_buffer_ssl_connect’ but no such parameter
SSLeay.c:7972: error: declaration for parameter ‘XS_Net__SSLeay_get_ssl_method’ but no such parameter
SSLeay.c:7926: error: declaration for parameter ‘XS_Net__SSLeay_set_ssl_method’ but no such parameter
SSLeay.c:7864: error: declaration for parameter ‘XS_Net__SSLeay_TLSv1_method’ but no such parameter
SSLeay.c:1189: error: declaration for parameter ‘XS_Net__SSLeay_constant’ but no such parameter
SSLeay.c:1167: error: declaration for parameter ‘XS_Net__SSLeay_CLONE’ but no such parameter
SSLeay.c:1123: error: declaration for parameter ‘S_croak_xs_usage’ but no such parameter
SSLeay.xs:422: error: declaration for parameter ‘simple_cb_data_t’ but no such parameter
SSLeay.xs:359: error: declaration for parameter ‘perl_filehandle_t’ but no such parameter
SSLeay.c:13975: error: expected ‘{’ at end of input
make: *** [SSLeay.o] Error 1
Some CPAN modules require the C-header files to compile successfully. They end with -dev. These are not normally package with the OS. For Net::SSLeay you'll need to install libssl-dev.
For Debian distros: sudo apt-get install libssl-dev

how can I fix the error with making mtree

Hello I'm new to this and I don't understand, what's going on.
I need mtree for my iPhone and got an error.
And this is what I get:
In file included from compare.c:62:
vis.h:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘size_t’
In file included from compare.c:65:
extern.h:52: warning: redundant redeclaration of ‘compare’
extern.h:40: warning: previous declaration of ‘compare’ was here
extern.h:59: warning: redundant redeclaration of ‘getmode’
/usr/include/unistd.h:700: warning: previous declaration of ‘getmode’ was here
extern.h:60: warning: redundant redeclaration of ‘setmode’
/usr/include/unistd.h:736: warning: previous declaration of ‘setmode’ was here
compare.c: In function ‘compare’:
compare.c:186: error: ‘struct stat’ has no member named ‘st_mtim’
compare.c:187: error: ‘struct stat’ has no member named ‘st_mtim’
compare.c:192: error: ‘struct stat’ has no member named ‘st_mtim’
make[1]: *** [compare.o] Error 1
make: *** [all] Error 2
The full message is at http://pastebin.com/rVUfVP75
compare.c:186: error: ‘struct stat’ has no member named ‘st_mtim’
It should be st_mtime. It looks like a typo.
The structure definition is here:
http://pubs.opengroup.org/onlinepubs/007908799/xsh/sysstat.h.html