Mailcore2 on iOS8 - ios8

My existing project failed to build after upgrading from Xcode 5.1.1 to Xcode 6.0. I have already tried removing the 'Externals' folder and doing a full clean.
While trying to find a solution I even updated the following files to add SDK version 8.0:
build-mailcore2-ios copy.sh
build-mailcore2-ios.sh
prepare-ctemplate-ios.sh
prepare-icu4c-ios.sh
prepare-libetpan-ios.sh
prepare-tidy-ios.sh
by adding the following:
if xcodebuild -showsdks|grep iphoneos8.0 >/dev/null ; then
sdkversion=8.0
devicearchs="armv7 armv7s arm64"
But it still fails to run the shell script. Following is the transcript of the error:
/bin/sh /Volumes/Disk\ 1/Apps/NoMyID/MailCore/Externals/builds/workdir/20140926183134/src/libetpan/build-mac/update.sh
/Volumes/Disk 1/Apps/NoMyID/MailCore/Externals/builds/workdir/20140926183134/src/libetpan/build-mac/update.sh: line 25: test: too many arguments
configuring
configure failed
Command /bin/sh failed with exit code 1
** BUILD FAILED **
The following build commands failed:
ExternalBuildToolExecution libetpan-prepare-ios
(1 failure)
failed
Current branch master is up to date.
building ctemplate
build for i386
/Volumes/Disk 1/Apps/NoMyID/MailCore/scripts/../Externals/builds/workdir/20140926183156/log/ctemplate-build.log
configure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
configure: WARNING: Libtool does not cope well with whitespace in `pwd`
configure: WARNING: Impossible to determine how to use pthreads with shared libraries and -nostdlib
src/template.cc:158:20: warning: unused variable 'kDefaultTemplateDirectory' [-Wunused-const-variable]
const char * const kDefaultTemplateDirectory = kCWD; // "./"
^
1 warning generated.
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
In file included from src/template_dictionary.cc:50:
./src/indented_writer.h:123:7: warning: private field 'original_indentation_' is not used [-Wunused-private-field]
int original_indentation_;
^
2 warnings generated.
src/template.cc:158:20: warning: unused variable 'kDefaultTemplateDirectory' [-Wunused-const-variable]
const char * const kDefaultTemplateDirectory = kCWD; // "./"
^
1 warning generated.
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
In file included from src/template_dictionary.cc:50:
./src/indented_writer.h:123:7: warning: private field 'original_indentation_' is not used [-Wunused-private-field]
int original_indentation_;
^
2 warnings generated.
src/template.cc:158:20: warning: unused variable 'kDefaultTemplateDirectory' [-Wunused-const-variable]
const char * const kDefaultTemplateDirectory = kCWD; // "./"
^
1 warning generated.
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
1 warning generated.
libtool: link: warning: `-version-info/-version-number' is ignored for convenience libraries
src/template.cc:158:20: warning: unused variable 'kDefaultTemplateDirectory' [-Wunused-const-variable]
const char * const kDefaultTemplateDirectory = kCWD; // "./"
^
1 warning generated.
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
1 warning generated.
libtool: link: warning: `-version-info/-version-number' is ignored for convenience libraries
libtool: link: warning: `-version-info/-version-number' is ignored for convenience libraries
libtool: link: warning: `-version-info/-version-number' is ignored for convenience libraries
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
1 warning generated.
src/template_dictionary.cc:76:26: warning: unused variable 'kAnnotateOutput' [-Wunused-const-variable]
static const char* const kAnnotateOutput = "__ctemplate_annotate_output__";
^
1 warning generated.
src/tests/template_unittest.cc:140:6: warning: unused function 'StreqExcept' [-Wunused-function]
bool StreqExcept(const char* a, const char* b, const char* except) {
^
1 warning generated.
src/tests/template_unittest.cc:140:6: warning: unused function 'StreqExcept' [-Wunused-function]
bool StreqExcept(const char* a, const char* b, const char* except) {
^
src/tests/template_unittest.cc:167:6: warning: unused function 'IntEqVerbose' [-Wunused-function]
bool IntEqVerbose(int a, int b) {
^
2 warnings generated.
src/tests/htmlparser_cpp_test.cc:94:18: warning: unused variable 'kMaxFileSize' [-Wunused-const-variable]
static const int kMaxFileSize = 1000000;
^
1 warning generated.
src/tests/htmlparser_cpp_test.cc:94:18: warning: unused variable 'kMaxFileSize' [-Wunused-const-variable]
static const int kMaxFileSize = 1000000;
^
1 warning generated.
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 file2
install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 ... fileN directory
install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make: *** [install-libLTLIBRARIES] Error 64
build of ctemplate failed
Showing first 200 notices only
Command /bin/sh failed with exit code 1
Any help is appreciated. Thanks.

After messing around with the shell scripts for a while, I downloaded the latest commit from Github (https://github.com/MailCore/mailcore2). Alas, it worked. I should have gone for this option before.

Sometimes the downloaded code from the "External" folder doesn't work. Therefore i stored a working "External" folder and whenever this happens, i overwrite the non-working "External" folder with the working one.
Before i compile the code, i disconnect my MacBook from every internet connection.
After it passes the MailCore2 Library compile task, i connect to the internet connection again.
But i'll give it a try to clone everything first whenever this error occures.
EDIT
Now i used the GitHub Application, cloning the MailCore2 project and linking the framework in the XCode Project. And this workes!

Related

error: "Protobuf requires at least C++11." with clang version already on version 13.1

I am using mac M1 chip.
i am doing bundle install to install the dependency of my service.
One of our ruby package is using protobuf, so i am getting below error while installing package natively.
Clang version installed is already 13+.
My ruby version is 2.6.6.
i tried with clang version below 11, but getting same error.
Anyone can help what is going wrong here?
/opt/homebrew/include/google/protobuf/stubs/port.h:123:2: error: "Protobuf requires at least C++11."
#error "Protobuf requires at least C++11."
^
/opt/homebrew/include/google/protobuf/stubs/port.h:129:26: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using ConstStringParam = const std::string &;
^
/opt/homebrew/include/google/protobuf/stubs/port.h:145:39: error: expected '(' for function-style cast or type construction
static const int64 kint64max = int64_t{0x7FFFFFFFFFFFFFFF};
~~~~~~~^
/opt/homebrew/include/google/protobuf/stubs/port.h:148:42: error: expected '(' for function-style cast or type construction
static const uint64 kuint64max = uint64_t{0xFFFFFFFFFFFFFFFFu};
~~~~~~~~^
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/src/one_quota.cpp:1:
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/include/one_quota.h:1:
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/protobuf/Consumer.pb.h:9:
In file included from /opt/homebrew/include/google/protobuf/stubs/common.h:49:
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:165:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using traits_type = std::char_traits<char>;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:166:22: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using value_type = char;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:167:19: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using pointer = char*;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:168:25: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using const_pointer = const char*;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:169:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using reference = char&;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:170:27: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using const_reference = const char&;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:171:26: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using const_iterator = const char*;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:172:20: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using iterator = const_iterator;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:173:34: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:174:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using reverse_iterator = const_reverse_iterator;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:175:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using size_type = size_t;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:176:27: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using difference_type = std::ptrdiff_t;
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:182:10: error: unknown type name 'constexpr'
static constexpr size_type kMaxSize =
^
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:182:29: error: expected ';' at end of declaration list
static constexpr size_type kMaxSize =
^
;
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:280:3: warning: explicit conversion functions are a C++11 extension [-Wc++11-extensions]
explicit operator std::string() const { return ToString(); }
^~~~~~~~
/opt/homebrew/include/google/protobuf/stubs/stringpiece.h:187:39: error: use of undeclared identifier 'kMaxSize'
if (PROTOBUF_PREDICT_FALSE(size > kMaxSize)) {
^
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/src/one_quota.cpp:1:
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/include/one_quota.h:1:
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/protobuf/Consumer.pb.h:9:
/opt/homebrew/include/google/protobuf/stubs/common.h:166:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto volatile unused = &var;
^
/opt/homebrew/include/google/protobuf/stubs/common.h:179:36: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
const char* what() const throw() override;
^
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/src/one_quota.cpp:1:
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/include/one_quota.h:1:
/Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/protobuf/Consumer.pb.h:17:2: error: This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
/Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/protobuf/Consumer.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/protobuf/Consumer.pb.h:19:2: error: regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/src/one_quota.cpp:1:
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/include/one_quota.h:1:
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/protobuf/Consumer.pb.h:22:
In file included from /opt/homebrew/include/google/protobuf/generated_message_util.h:49:
In file included from /opt/homebrew/include/google/protobuf/any.h:37:
In file included from /opt/homebrew/include/google/protobuf/arenastring.h:38:
In file included from /opt/homebrew/include/google/protobuf/stubs/logging.h:36:
/opt/homebrew/include/google/protobuf/stubs/status.h:46:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class StatusCode : int {
^
/opt/homebrew/include/google/protobuf/stubs/status.h:81:43: warning: use of enumeration in a nested name specifier is a C++11 extension [-Wc++11-extensions]
bool ok() const { return error_code_ == StatusCode::kOk; }
^
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/src/one_quota.cpp:1:
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/include/one_quota.h:1:
In file included from /Users/<username>.rvm/gems/ruby-2.6.6/gems/pipeline-3.2/ext/protobuf/protobuf/Consumer.pb.h:22:
In file included from /opt/homebrew/include/google/protobuf/generated_message_util.h:49:
In file included from /opt/homebrew/include/google/protobuf/any.h:37:
In file included from /opt/homebrew/include/google/protobuf/arenastring.h:40:
In file included from /opt/homebrew/include/google/protobuf/arena.h:55:
/opt/homebrew/include/google/protobuf/arena_impl.h:54:8: error: unknown type name 'constexpr'
inline constexpr size_t AlignUpTo8(size_t n) {
^
/opt/homebrew/include/google/protobuf/arena_impl.h:54:1: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr size_t AlignUpTo8(size_t n) {
^
/opt/homebrew/include/google/protobuf/arena_impl.h:54:24: error: expected ';' after top level declarator
inline constexpr size_t AlignUpTo8(size_t n) {
^
;
/opt/homebrew/include/google/protobuf/arena_impl.h:90:30: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
~ArenaMetricsCollector() = default;
^
/opt/homebrew/include/google/protobuf/arena_impl.h:95:10: error: unknown type name 'constexpr'
static constexpr size_t kDefaultStartBlockSize = 256;
^
/opt/homebrew/include/google/protobuf/arena_impl.h:95:26: error: expected ';' at end of declaration list
static constexpr size_t kDefaultStartBlockSize = 256;
^
;
/opt/homebrew/include/google/protobuf/arena_impl.h:96:10: error: unknown type name 'constexpr'
static constexpr size_t kDefaultMaxBlockSize = 8192;
^
/opt/homebrew/include/google/protobuf/arena_impl.h:96:26: error: expected ';' at end of declaration list
static constexpr size_t kDefaultMaxBlockSize = 8192;
^
;
/opt/homebrew/include/google/protobuf/arena_impl.h:98:3: error: unknown type name 'size_t'
size_t start_block_size = kDefaultStartBlockSize;
^
/opt/homebrew/include/google/protobuf/arena_impl.h:98:27: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
size_t start_block_size = kDefaultStartBlockSize;
^
/opt/homebrew/include/google/protobuf/arena_impl.h:99:3: error: unknown type name 'size_t'
size_t max_block_size = kDefaultMaxBlockSize;
^
/opt/homebrew/include/google/protobuf/arena_impl.h:99:25: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
size_t max_block_size = kDefaultMaxBlockSize;
^
/opt/homebrew/include/google/protobuf/arena_impl.h:100:24: error: unknown type name 'size_t'
void* (*block_alloc)(size_t) = nullptr;
^
/opt/homebrew/include/google/protobuf/arena_impl.h:100:32: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
void* (*block_alloc)(size_t) = nullptr;
^
/opt/homebrew/include/google/protobuf/arena_impl.h:101:32: error: unknown type name 'size_t'
void (*block_dealloc)(void*, size_t) = nullptr;
^
/opt/homebrew/include/google/protobuf/arena_impl.h:101:40: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
void (*block_dealloc)(void*, size_t) = nullptr;
^
/opt/homebrew/include/google/protobuf/arena_impl.h:102:44: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
ArenaMetricsCollector* metrics_collector = nullptr;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
25 warnings and 20 errors generated.
make[2]: *** [src/CMakeFiles/Protobuf.dir/one_quota.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/Protobuf.dir/all] Error 2
make: *** [all] Error 2

What Else Do I Need to Do to Run the lwIP Simulation in Omnet++?

I am still trying to run the following simulation on Omnet 5.6.1 (using INET 4.2.5) inet/examples/inet/nclients/omnetpp.ini.
When I build INET without TCP (lwIP) checkbox checked in the Project Features window I get a clean build. If I check the checkbox I get the following 26 errors:
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:47:9: error: expected ';' at end of declaration list
u32_t s_addr;
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:69:7: error: functions that differ only in their return type cannot be overloaded
u32_t inet_addr(const char *cp);
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:69:7: warning: 'inet_addr' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
u32_t inet_addr(const char *cp);
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:47:9: error: expected ';' at end of declaration list
u32_t s_addr;
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:69:7: error: functions that differ only in their return type cannot be overloaded
u32_t inet_addr(const char *cp);
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:69:7: warning: 'inet_addr' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
u32_t inet_addr(const char *cp);
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:71:7: error: conflicting types for 'inet_ntoa'
char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:71:7: warning: 'inet_ntoa' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:47:9: error: expected ';' at end of declaration list
u32_t s_addr;
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:71:7: error: conflicting types for 'inet_ntoa'
char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:69:7: error: functions that differ only in their return type cannot be overloaded
u32_t inet_addr(const char *cp);
::38: C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\x86_64-w64-mingw32\include\winnt.h WINSOCK_API_LINKAGE unsigned __LONG32 WSAAPI inet_addr(const char *cp);:
C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\x86_64-w64-mingw32\include\winnt.h:147:37: WINSOCK_API_LINKAGE u_short WSAAPI htons(u_short hostshort);52
^inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h
:111:7: error: functions that differ only in their return type cannot be overloaded
u32_t htonl(u32_t x);
In file included from inet/transportlayer/tcp_lwip/lwip/include\lwip/lwip_tcp.hC:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\x86_64-w64-mingw32\include\winnt.hinet/transportlayer/tcp_lwip/lwip/include\lwip/lwip_tcp.h::52: WINSOCK_API_LINKAGE unsigned __LONG32 WSAAPI inet_addr(const char *cp);147:
:In file included from
37 ^inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/lwip_ip.h
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:112:7: error: functions that differ only in their return type cannot be overloaded
u32_t ntohl(u32_t x);
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:71:7: error: conflicting types for 'inet_ntoa'
char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:111:7: error: functions that differ only in their return type cannot be overloaded
u32_t htonl(u32_t x);
In file included from inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/lwip_ip.h::112:7: error: functions that differ only in their return type cannot be overloaded
u32_t ntohl(u32_t x);
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:112:7: error: functions that differ only in their return type cannot be overloaded
u32_t ntohl(u32_t x);
119:9: C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\x86_64-w64-mingw32\include\winsock2.hwarning:: 'IN_CLASSB_HOST' macro redefined [-Wmacro-redefined]
#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:111:7: error: functions that differ only in their return type cannot be overloaded
u32_t htonl(u32_t x);
In file included from inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/ip_addr.h:37:
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:112:7: error: functions that differ only in their return type cannot be overloaded
u32_t ntohl(u32_t x);
9 warnings and 5 errors generated.
9 warnings and 5 errors generated.
make[1]: *** [Makefile:1762: ../out/clang-debug/src/inet/transportlayer/tcp_lwip/LwipTcpLayer.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1762: ../out/clang-debug/src/inet/transportlayer/tcp_lwip/lwip/core/memp.o] Error 1
9 warnings and 5 errors generated.
make[1]: *** [Makefile:1762: ../out/clang-debug/src/inet/transportlayer/tcp_lwip/TcpLwipConnection.o] Error 1
9 warnings and 5 errors generated.
make[1]: *** [Makefile:1762: ../out/clang-debug/src/inet/transportlayer/tcp_lwip/TcpLwip.o] Error 1
make[1]: Leaving directory '/c/OMNET/omnetpp561/inet4/src'
make: *** [Makefile:7: all] Error 2
"make MODE=debug -j4 all" terminated with exit code 2. Build might be incomplete.
When I try to run the simulation I get the following error:
<!> Error: Cannot load library '../../../src//libINET.dll': The specified module could not be found
End.
Simulation terminated with exit code: 1
Working directory: C:/OMNET/omnetpp561/inet4/examples/inet/nclients
Command line: ../../../../../../Pakhuis/Akademie/MEng/Thesis/Simulasie/WorkSpaces/ThesisSimulations/ThesisSimulations/src/ThesisSimulations.exe -m -n ../../../src;../..;../../../tutorials;../../../showcases --image-path=../../../images -l ../../../src/INET omnetpp.ini
<!> Error: Cannot load library '../../../src//libINET.dll': The specified module could not be found
End.
Simulation terminated with exit code: 1
Working directory: C:/OMNET/omnetpp561/inet4/examples/inet/nclients
Command line: ../../../../../../Pakhuis/Akademie/MEng/Thesis/Simulasie/WorkSpaces/ThesisSimulations/ThesisSimulations/src/ThesisSimulations.exe -m -n ../../../src;../..;../../../tutorials;../../../showcases --image-path=../../../images -l ../../../src/INET omnetpp.ini
Environment variables:
PATH=;C:/OMNET/omnetpp561/inet4/src;C:\OMNET\omnetpp561\omnetpp-5.6.1\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin;;C:/OMNET/omnetpp561/omnetpp-5.6.1/ide/jre/bin/server;C:/OMNET/omnetpp561/omnetpp-5.6.1/ide/jre/bin;C:/OMNET/omnetpp561/omnetpp-5.6.1/ide/jre/lib/amd64;.;C:\OMNET\omnetpp561\omnetpp-5.6.1\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\local\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin\site_perl;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin\vendor_perl;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin\core_perl;C:\OMNET\omnetpp561\omnetpp-5.6.1;
OMNETPP_ROOT=C:/OMNET/omnetpp561/omnetpp-5.6.1/
OMNETPP_IMAGE_PATH=C:\OMNET\omnetpp561\omnetpp-5.6.1\images
I have tried re installing OMNET++ and using other INET versions. I also tried using OMNET 4.2.2 with no success.
Can someone please advise what I should do?
Kind regards
Benjamin
The TCP_LWIP feature works only on Linux. On Windows, certain functions are clashing with the windows winsock2 library. (That's why the feature is disabled by default)

Errors while Installing Garfield++

Apologies beforehand, I figure this is the kind of thing that probably has been posted about before but I couldn't find anything when I searched.
I'm trying to install Garfield++ and getting some error messages when I try to run the cmake. My system is running Ubuntu 18.04.5 LTS and ROOT version 6.20/02.
Everything seems to go fine until I try make -j N
When that happens I get these errors.
[ 0%] Generating GarfieldDict.cxx, libGarfieldDict_rdict.pcm, libGarfieldDict.rootmap
In file included from input_line_6:3:
In file included from /home/jason/Root/build/include/TObject.h:18:
/home/jason/Root/build/include/TStorage.h:93:4: error: use of undeclared identifier 'R__likely'
ClassDef(TStorage,0) //Storage manager class
^
/home/jason/Root/build/include/Rtypes.h:327:4: note: expanded from macro 'ClassDef'
_ClassDefOutline_(name,id,virtual,) \
^
/home/jason/Root/build/include/Rtypes.h:301:4: note: expanded from macro '_ClassDefOutline_'
_ClassDefBase_(name,id, virtual_keyword, overrd) \
^
/home/jason/Root/build/include/Rtypes.h:276:11: note: expanded from macro '_ClassDefBase_'
if (R__likely(recurseBlocker >= 2)) ...
^
In file included from input_line_6:3:
In file included from /home/jason/Root/build/include/TObject.h:18:
/home/jason/Root/build/include/TStorage.h:93:13: error: 'TStorage' does not refer to a value
ClassDef(TStorage,0) //Storage manager class
^
/home/jason/Root/build/include/TStorage.h:33:7: note: declared here
class TStorage {
^
/home/jason/Root/build/include/TStorage.h:118:1: error: use of undeclared identifier 'R__INTENTIONALLY_UNINIT_BEGIN'
R__INTENTIONALLY_UNINIT_BEGIN
^
/home/jason/Root/build/include/TStorage.h:120:1: error: use of undeclared identifier 'R__INTENTIONALLY_UNINIT_END'
R__INTENTIONALLY_UNINIT_END
^
/home/jason/Root/build/include/TStorage.h:131:1: error: unknown type name 'R__NEVER_INLINE'
R__NEVER_INLINE void TStorage::UpdateIsOnHeap(volatile const UInt_t &uni...
^
/home/jason/Root/build/include/TStorage.h:131:17: error: expected unqualified-id
R__NEVER_INLINE void TStorage::UpdateIsOnHeap(volatile const UInt_t &uni...
^
In file included from input_line_6:3:
/home/jason/Root/build/include/TObject.h:133:4: error: unknown type name 'R__ALWAYS_INLINE'
R__ALWAYS_INLINE Bool_t IsOnHeap() const { return TestBit(kIsOnHeap); }
^
/home/jason/Root/build/include/TObject.h:133:27: error: expected ';' at end of declaration list
R__ALWAYS_INLINE Bool_t IsOnHeap() const { return TestBit(kIsOnHeap); }
^
;
/home/jason/Root/build/include/TObject.h:169:30: error: unknown type name 'Bool_t'
void SetBit(UInt_t f, Bool_t set);
^
/home/jason/Root/build/include/TObject.h:172:4: error: unknown type name 'R__ALWAYS_INLINE'
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const { return (Bool_t) ((f...
^
/home/jason/Root/build/include/TObject.h:172:21: error: duplicate member 'Bool_t'
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const { return (Bool_t) ((f...
^
/home/jason/Root/build/include/TObject.h:133:21: note: previous declaration is here
R__ALWAYS_INLINE Bool_t IsOnHeap() const { return TestBit(kIsOnHeap); }
^
/home/jason/Root/build/include/TObject.h:172:27: error: expected ';' at end of declaration list
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const { return (Bool_t) ((f...
^
;
/home/jason/Root/build/include/TObject.h:210:11: error: unknown type name 'Bool_t'
static Bool_t GetObjectStat();
^
/home/jason/Root/build/include/TObject.h:211:35: error: unknown type name 'Bool_t'
static void SetObjectStat(Bool_t stat);
^
/home/jason/Root/build/include/TObject.h:215:4: error: unknown type name 'Bool_t'
ClassDef(TObject,1) //Basic ROOT object
^
/home/jason/Root/build/include/Rtypes.h:327:4: note: expanded from macro 'ClassDef'
_ClassDefOutline_(name,id,virtual,) \
^
/home/jason/Root/build/include/Rtypes.h:301:4: note: expanded from macro '_ClassDefOutline_'
_ClassDefBase_(name,id, virtual_keyword, overrd) \
^
/home/jason/Root/build/include/Rtypes.h:273:20: note: expanded from macro '_ClassDefBase_'
virtual_keyword Bool_t CheckTObjectHashConsistency() const overr...
^
In file included from input_line_6:3:
/home/jason/Root/build/include/TObject.h:215:4: error: use of undeclared identifier 'R__likely'
/home/jason/Root/build/include/Rtypes.h:327:4: note: expanded from macro 'ClassDef'
_ClassDefOutline_(name,id,virtual,) \
^
/home/jason/Root/build/include/Rtypes.h:301:4: note: expanded from macro '_ClassDefOutline_'
_ClassDefBase_(name,id, virtual_keyword, overrd) \
^
/home/jason/Root/build/include/Rtypes.h:276:11: note: expanded from macro '_ClassDefBase_'
if (R__likely(recurseBlocker >= 2)) ...
^
In file included from input_line_6:3:
/home/jason/Root/build/include/TObject.h:215:13: error: 'TObject' does not refer to a value
ClassDef(TObject,1) //Basic ROOT object
^
/home/jason/Root/build/include/TObject.h:37:7: note: declared here
class TObject {
^
/home/jason/Root/build/include/TObject.h:237:8: error: use of undeclared identifier 'R__unlikely'
if (R__unlikely(fgObjectStat)) TObject::AddToTObjectTable(this);
^
/home/jason/Root/build/include/TObject.h:261:8: error: use of undeclared identifier 'R__unlikely'
if (R__unlikely(fgObjectStat)) TObject::AddToTObjectTable(this);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Error: Error loading the default header files.
CMakeFiles/Garfield.dir/build.make:208: recipe for target 'GarfieldDict.cxx' failed
make[2]: *** [GarfieldDict.cxx] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Garfield.dir/all' failed
make[1]: *** [CMakeFiles/Garfield.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
To be frank, I have only a vague idea what this means. I think it means that the Garfield++ cmake can find my ROOT but for some reason can't read it properly, which I don't know how to fix.
Any help would be appreciated.
I followed the instructions at https://garfieldpp.web.cern.ch/garfieldpp/getting-started/
Phase 1 --
The only deviation from the link was having to tell ccmake where my root directory was. 1st Phase - Checked Prerequisites: A C++ compiler that could support C++11, Root (at least version 6), GSL (GNU Scientific Library), and CMake (at least version 3.3). Only lacked GSL so I went to http://mirrors.ibiblio.org/gnu/ftp/gnu/gsl and, downloaded and installed version 2.6.
Phase 2
mkdir GARFIELD
export GARFIELD_HOME=/home/GARFIELD
git clone http://gitlab.cern.ch/garfield/garfieldpp.git $GARFIELD_HOME
cd $GARFIELD_HOME
mkdir build
cd build
cmake $GARFIELD_HOME
make -j 4
The last step which has the failure. [Though I have noticed that the second to last step, while it runs, does leave a field blank. So here's the results of cmake $GARFIELD_HOME.
-- -----------------------------------------------------------
-- Garfield source files: Source/AvalancheMC.cc;Source/AvalancheMicroscopic.cc;Source/Component.cc;Source/ComponentAnalyticField.cc;Source/ComponentAnsys121.cc;Source/ComponentAnsys123.cc;Source/ComponentCST.cc;Source/ComponentComsol.cc;Source/ComponentConstant.cc;Source/ComponentElmer.cc;Source/ComponentElmer2D.cc;Source/ComponentFieldMap.cc;Source/ComponentGrid.cc;Source/ComponentNeBem2d.cc;Source/ComponentNeBem3d.cc;Source/ComponentNeBem3dMap.cc;Source/ComponentTcad2d.cc;Source/ComponentTcad3d.cc;Source/ComponentUser.cc;Source/ComponentVoxel.cc;Source/DriftLineRKF.cc;Source/GeometryRoot.cc;Source/GeometrySimple.cc;Source/KDTree.cc;Source/Medium.cc;Source/MediumCdTe.cc;Source/MediumGaAs.cc;Source/MediumGas.cc;Source/MediumMagboltz.cc;Source/MediumSilicon.cc;Source/Numerics.cc;Source/OpticalData.cc;Source/PlottingEngineRoot.cc;Source/Polygon.cc;Source/Random.cc;Source/RandomEngineRoot.cc;Source/Sensor.cc;Source/Shaper.cc;Source/Solid.cc;Source/SolidBox.cc;Source/SolidExtrusion.cc;Source/SolidHole.cc;Source/SolidRidge.cc;Source/SolidSphere.cc;Source/SolidTube.cc;Source/SolidWire.cc;Source/TetrahedralTree.cc;Source/Track.cc;Source/TrackBichsel.cc;Source/TrackElectron.cc;Source/TrackHeed.cc;Source/TrackPAI.cc;Source/TrackSimple.cc;Source/TrackSrim.cc;Source/ViewBase.cc;Source/ViewCell.cc;Source/ViewDrift.cc;Source/ViewFEMesh.cc;Source/ViewField.cc;Source/ViewGeometry.cc;Source/ViewIsochrons.cc;Source/ViewMedium.cc;Source/ViewSignal.cc;GarfieldDict.cxx
-- -----------------------------------------------------------
-- Heed source files: Heed/HeedFieldMap.cpp;Heed/heed++/code/BGMesh.cpp;Heed/heed++/code/ElElasticScat.cpp;Heed/heed++/code/EnTransfCS.cpp;Heed/heed++/code/EnTransfCS_BGM.cpp;Heed/heed++/code/EnergyMesh.cpp;Heed/heed++/code/HeedCluster.cpp;Heed/heed++/code/HeedCondElectron.cpp;Heed/heed++/code/HeedDeltaElectron.cpp;Heed/heed++/code/HeedDeltaElectronCS.cpp;Heed/heed++/code/HeedMatterDef.cpp;Heed/heed++/code/HeedParticle.cpp;Heed/heed++/code/HeedParticle_BGM.cpp;Heed/heed++/code/HeedPhoton.cpp;Heed/heed++/code/PairProd.cpp;Heed/heed++/code/PhotoAbsCS.cpp;Heed/heed++/code/PhotoAbsCSLib.cpp;;Heed/wcpplib/geometry/box.cpp;Heed/wcpplib/geometry/circumf.cpp;Heed/wcpplib/geometry/gparticle.cpp;Heed/wcpplib/geometry/mparticle.cpp;Heed/wcpplib/geometry/plane.cpp;Heed/wcpplib/geometry/polyline.cpp;Heed/wcpplib/geometry/straight.cpp;Heed/wcpplib/geometry/surface.cpp;Heed/wcpplib/geometry/trajestep.cpp;Heed/wcpplib/geometry/vec.cpp;Heed/wcpplib/geometry/volume.cpp;Heed/wcpplib/ioniz/bethe_bloch.cpp;Heed/wcpplib/ioniz/e_cont_enloss.cpp;Heed/wcpplib/math/DoubleAc.cpp;Heed/wcpplib/math/PolLeg.cpp;Heed/wcpplib/math/cubic.cpp;Heed/wcpplib/math/kinem.cpp;Heed/wcpplib/math/linexi2.cpp;Heed/wcpplib/math/lorgamma.cpp;Heed/wcpplib/math/parabola.cpp;Heed/wcpplib/matrix/inverse.cpp;Heed/wcpplib/matrix/multiply.cpp;Heed/wcpplib/matter/AtomDef.cpp;Heed/wcpplib/matter/GasDef.cpp;Heed/wcpplib/matter/GasLib.cpp;Heed/wcpplib/matter/MatterDef.cpp;Heed/wcpplib/matter/MoleculeDef.cpp;Heed/wcpplib/particle/eparticle.cpp;Heed/wcpplib/particle/particle_def.cpp;Heed/wcpplib/random/PointsRan.cpp;Heed/wcpplib/random/chisran.cpp;Heed/wcpplib/random/pois.cpp;Heed/wcpplib/random/rnorm.cpp;Heed/wcpplib/safetl/AbsArr.cpp;Heed/wcpplib/safetl/AbsPtr.cpp;Heed/wcpplib/stream/definp.cpp;Heed/wcpplib/stream/findmark.cpp;Heed/wcpplib/stream/prstream.cpp;Heed/wcpplib/util/FunNameStack.cpp
-- -----------------------------------------------------------
-- Magboltz source files: Source/magboltz-11.9.f
-- -----------------------------------------------------------
-- neBEM source files: NeBem/ComputeProperties.c;NeBem/GarfieldppInterface.cpp;NeBem/Isles.c;NeBem/ReTriM.c;NeBem/Vector.c;NeBem/luc.c;NeBem/neBEM.c;NeBem/neBEMInterface.c;NeBem/nrutil.c;NeBem/svdcmp.c
-- -----------------------------------------------------------
-- Directory used to find ROOT dict files:
-- -----------------------------------------------------------
-- Garfield++ examples will be built. In order disable this option use -DWITH_EXAMPLES=OFF
-- Install path: /usr/local
-- If you want to change this path call cmake -DCMAKE_INSTALL_PREFIX=my_install_path ...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jason/GARFIELD/build
Notice the Root directory line is blank. How do I fix that?
Edit:2-
Measured success. Switched the location where ROOT is read from to where it was installed instead of where it was built and I got a new error message.
[ 0%] Generating GarfieldDict.cxx, libGarfieldDict_rdict.pcm, libGarfieldDict.rootmap
No such file or directory
CMakeFiles/Garfield.dir/build.make:208: recipe for target 'GarfieldDict.cxx' failed
make[2]: *** [GarfieldDict.cxx] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Garfield.dir/all' failed
make[1]: *** [CMakeFiles/Garfield.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Still emotionally processing the full implications.

Clang and Linux kernel

I try to make AST file for Linux kernel 2.6.37 code with clang 8.0.0.
I run following in kernel root directory
clang -emit-ast init/main.c -o astfile -std=c11 -Iinclude -Iarch/x86/include
and get errors
In file included from /mnt/lfs/sources/linux-2.6.37/init/main.c:12:
/mnt/lfs/sources/linux-2.6.37/include/linux/types.h:13:2: warning: "Attempt to use kernel
headers from user space, see http://kernelnewbies.org/KernelHeaders" [-W#warnings]
#warning "Attempt to use kernel headers from user space, see http://kernelnewbies...
^
In file included from /mnt/lfs/sources/linux-2.6.37/init/main.c:13:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/module.h:9:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/list.h:7:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/prefetch.h:14:
In file included from /mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/processor.h:15:
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/current.h:12:8: error: unknown type
name '__always_inline'
static __always_inline struct task_struct *get_current(void)
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/current.h:12:24: error: expected
identifier or '('
static __always_inline struct task_struct *get_current(void)
^
In file included from /mnt/lfs/sources/linux-2.6.37/init/main.c:13:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/module.h:9:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/list.h:7:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/prefetch.h:14:
In file included from /mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/processor.h:17:
In file included from /mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/system.h:7:
In file included from /mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/cmpxchg.h:4:
In file included from /mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/cmpxchg_64.h:4:
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/alternative.h:47:2: error: unknown
type name 'u8'
u8 *instr; /* original instruction */
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/alternative.h:48:2: error: unknown
type name 'u8'
u8 *replacement;
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/alternative.h:49:2: error: unknown
type name 'u16'
u16 cpuid; /* cpuid bit set for replacement */
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/alternative.h:50:2: error: unknown
type name 'u8'
u8 instrlen; /* length of original instruction */
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/alternative.h:51:2: error: unknown
type name 'u8'
u8 replacementlen; /* length of new instruction, <= instrlen */
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/alternative.h:164:62: error: unknown
type name 'size_t'
extern void *text_poke_early(void *addr, const void *opcode, size_t len);
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/alternative.h:183:56: error: unknown
type name 'size_t'
extern void *text_poke(void *addr, const void *opcode, size_t len);
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/alternative.h:184:60: error: unknown
type name 'size_t'
extern void *text_poke_smp(void *addr, const void *opcode, size_t len);
^
In file included from /mnt/lfs/sources/linux-2.6.37/init/main.c:13:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/module.h:9:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/list.h:7:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/prefetch.h:14:
In file included from /mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/processor.h:17:
In file included from /mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/system.h:7:
In file included from /mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/cmpxchg.h:4:
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/cmpxchg_64.h:6:39: error: unknown type
name 'u64'
static inline void set_64bit(volatile u64 *ptr, u64 val)
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/cmpxchg_64.h:6:49: error: unknown type
name 'u64'
static inline void set_64bit(volatile u64 *ptr, u64 val)
^
In file included from /mnt/lfs/sources/linux-2.6.37/init/main.c:13:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/module.h:9:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/list.h:7:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/prefetch.h:14:
In file included from /mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/processor.h:17:
In file included from /mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/system.h:11:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/irqflags.h:15:
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/irqflags.h:20:2: error: use of
undeclared identifier 'asm'
asm volatile("# __raw_save_flags\n\t"
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/irqflags.h:31:2: error: use of
undeclared identifier 'asm'
asm volatile("push %0 ; popf"
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/irqflags.h:39:2: error: use of
undeclared identifier 'asm'
asm volatile("cli": : :"memory");
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/irqflags.h:44:2: error: use of
undeclared identifier 'asm'
asm volatile("sti": : :"memory");
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/irqflags.h:49:2: error: use of
undeclared identifier 'asm'
asm volatile("sti; hlt": : :"memory");
^
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/irqflags.h:54:2: error: use of
undeclared identifier 'asm'
asm volatile("hlt": : :"memory");
^
In file included from /mnt/lfs/sources/linux-2.6.37/init/main.c:13:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/module.h:9:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/list.h:7:
In file included from /mnt/lfs/sources/linux-2.6.37/include/linux/prefetch.h:14:
In file included from /mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/processor.h:17:
/mnt/lfs/sources/linux-2.6.37/arch/x86/include/asm/system.h:335:2: error: use of
undeclared identifier 'asm'
asm volatile("clflush %0" : "+m" (*(volatile char __force *)__p));
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
Please help, I have tried to google about this errors, but found nothing appropriate. I have added kernel header from kernel source directory with -I flag, because compiler could not find them on my system ArchLinux 5.0.10-arch1-1-ARCH.
Finally I've done this with help of Kamil Cuk. I've used my .config file which have been generated for compilation during kernel configuration. I've opened it in Vim, removed #-lines and =y, added #define in the beginning of each line and saved as config.h in kernel root directory.
clang -emit-ast init/main.c -o astfile -I include -I arch/x86/include -D __EXPORTED_HEADERS__ -D __KERNEL__ -include config.h

Swoole make failed ubuntu16.04

I am trying to install SWOOLE on my Ubuntu-16.04
I tried this sudo pecl install swoole
But am getting a long list of errors(Skipped some lines)
In file included from /tmp/pear/temp/swoole/php_swoole.h:156:0,
from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h: In function 'sw_zend_is_callable':
/tmp/pear/temp/swoole/php7_wrapper.h:238:5: error: unknown type name 'zend_string'
zend_string *key = NULL;
^
/tmp/pear/temp/swoole/php7_wrapper.h:239:5: warning: passing argument 3 of 'zend_is_callable' from incompatible pointer type [enabled by default]
int ret = zend_is_callable(cb, a, &key);
^
In file included from /usr/include/php5/main/php.h:39:0,
from /tmp/pear/temp/swoole/php_swoole.h:25,
from /tmp/pear/temp/swoole/swoole.c:16:
/usr/include/php5/Zend/zend_API.h:301:20: note: expected 'char **' but argument is of type 'int **'
ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, char **callable_name TSRMLS_DC);
^
In file included from /usr/include/php5/Zend/zend.h:252:0,
from /usr/include/php5/main/php.h:35,
from /tmp/pear/temp/swoole/php_swoole.h:25,
from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h:240:29: error: request for member 'val' in something not a structure or union
char *tmp = estrndup(key->val, key->len);
^
/usr/include/php5/Zend/zend_alloc.h:78:44: note: in definition of macro 'estrndup'
#define estrndup(s, length) _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
^
/tmp/pear/temp/swoole/php7_wrapper.h:240:39: error: request for member 'len' in something not a structure or union
char *tmp = estrndup(key->val, key->len);
^
/usr/include/php5/Zend/zend_alloc.h:78:49: note: in definition of macro 'estrndup'
#define estrndup(s, length) _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
^
In file included from /tmp/pear/temp/swoole/php_swoole.h:156:0,
from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h: In function 'sw_zend_is_callable_ex':
/tmp/pear/temp/swoole/php7_wrapper.h:248:5: error: unknown type name 'zend_string'
zend_string *key = NULL;
^
/tmp/pear/temp/swoole/php7_wrapper.h:249:5: warning: passing argument 4 of 'zend_is_callable_ex' from incompatible pointer type [enabled by default]
int ret = zend_is_callable_ex(callable, NULL, check_flags, &key, fcc, error);
make: *** [swoole.lo] Error 1
ERROR: `make' failed
I have also tried this
cd swoole-src
./configure
make
Which is also giving the similar errors.
How to solve this? thanks in advance!
EDIT : Added the first Generated ERRORS too

Resources