Really impossible to make package with Theos - makefile

I really don't manage to "make package" with Theos for a Tweak made by me, so I copied the "unlockchanger" example on the web (here https://github.com/codyd51/Theos-Examples/tree/master/unlockchanger ) and tried to do "make package". I get these errors:
iPhone-di-Gabriele:/var/mobile/unlockchanger root# make package
/var/mobile/unlockchanger/theos/makefiles/targets/Darwin-arm/iphone.mk:43: Targeting iOS 4.0 and higher is not supported with iphone-gcc. Forcing clang.
/var/mobile/unlockchanger/theos/makefiles/targets/Darwin-arm/iphone.mk:53: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for tweak UnlockChanger...
Preprocessing Tweak.xm...
Compiling Tweak.xm...
In file included from Tweak.xm:3:
/var/mobile/unlockchanger/theos/include/substrate.h:57:20: error: unknown type name 'pid_t'
bool MSHookProcess(pid_t pid, const char *library);
^
/var/mobile/unlockchanger/theos/include/substrate.h:69:1: error: unknown type name 'IMP'
IMP MSHookMessage(Class _class, SEL sel, IMP imp, const char *prefix _default(NULL));
^
/var/mobile/unlockchanger/theos/include/substrate.h:69:42: error: unknown type name 'IMP'
IMP MSHookMessage(Class _class, SEL sel, IMP imp, const char *prefix _default(NULL));
^
/var/mobile/unlockchanger/theos/include/substrate.h:69:79: error: use of undeclared identifier 'NULL'
IMP MSHookMessage(Class _class, SEL sel, IMP imp, const char *prefix _default(NULL));
^
/var/mobile/unlockchanger/theos/include/substrate.h:48:27: note: expanded from macro '_default'
#define _default(value) = value
^
/var/mobile/unlockchanger/theos/include/substrate.h:71:45: error: unknown type name 'IMP'
void MSHookMessageEx(Class _class, SEL sel, IMP imp, IMP *result);
^
/var/mobile/unlockchanger/theos/include/substrate.h:71:54: error: unknown type name 'IMP'
void MSHookMessageEx(Class _class, SEL sel, IMP imp, IMP *result);
^
/var/mobile/unlockchanger/theos/include/substrate.h:125:92: error: use of undeclared identifier 'NULL'
static inline Type_ *MSHookMessage(Class _class, SEL sel, Type_ *imp, const char *prefix = NULL) {
^
/var/mobile/unlockchanger/theos/include/substrate.h:126:82: error: unknown type name 'IMP'
return reinterpret_cast<Type_ *>(MSHookMessage(_class, sel, reinterpret_cast<IMP>(imp), prefix));
^
/var/mobile/unlockchanger/theos/include/substrate.h:132:58: error: unknown type name 'IMP'
return MSHookMessageEx(_class, sel, reinterpret_cast<IMP>(imp), reinterpret_cast<IMP *>(result));
^
/var/mobile/unlockchanger/theos/include/substrate.h:132:86: error: unknown type name 'IMP'
return MSHookMessageEx(_class, sel, reinterpret_cast<IMP>(imp), reinterpret_cast<IMP *>(result));
^
/var/mobile/unlockchanger/theos/include/substrate.h:137:5: error: use of undeclared identifier 'Ivar'
Ivar ivar(class_getInstanceVariable(object_getClass(self), name));
^
/var/mobile/unlockchanger/theos/include/substrate.h:138:19: error: use of undeclared identifier 'ivar'
void *pointer(ivar == NULL ? NULL : reinterpret_cast<char *>(self) + ivar_getOffset(ivar));
^
/var/mobile/unlockchanger/theos/include/substrate.h:138:27: error: use of undeclared identifier 'NULL'
void *pointer(ivar == NULL ? NULL : reinterpret_cast<char *>(self) + ivar_getOffset(ivar));
^
/var/mobile/unlockchanger/theos/include/substrate.h:138:34: error: use of undeclared identifier 'NULL'
void *pointer(ivar == NULL ? NULL : reinterpret_cast<char *>(self) + ivar_getOffset(ivar));
^
/var/mobile/unlockchanger/theos/include/substrate.h:138:89: error: use of undeclared identifier 'ivar'
void *pointer(ivar == NULL ? NULL : reinterpret_cast<char *>(self) + ivar_getOffset(ivar));
^
/var/mobile/unlockchanger/theos/include/substrate.h:294:71: error: use of undeclared identifier 'NULL'
return MSHookFunction(symbol, replace, reinterpret_cast<Type_ **>(NULL));
^
/var/mobile/unlockchanger/theos/include/substrate.h:298:85: error: use of undeclared identifier 'NULL'
static inline void MSHookSymbol(Type_ *&value, const char *name, MSImageRef image = NULL) {
^
/var/mobile/unlockchanger/theos/include/substrate.h:303:86: error: use of undeclared identifier 'NULL'
static inline void MSHookFunction(const char *name, Type_ *replace, Type_ **result = NULL) {
^
/var/mobile/unlockchanger/theos/include/substrate.h:310:104: error: use of undeclared identifier 'NULL'
static inline void MSHookFunction(MSImageRef image, const char *name, Type_ *replace, Type_ **result = NULL) {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [obj/Tweak.xm.7838be1a.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [UnlockChanger.all.tweak.variables] Error 2
Some detail:
I'm on iOS8.1, with an iPhone 5. Everything installed from Cydia
..and on Windows 8.1 with WinSCP and PuTTY
I've installed Theos, Perl.. everything (Also "BigBoss recommended packages")
I had to install also LLVM+Clang because make didn't find a "clang++" command
I've tried to dump classes, instead of taking them from the web
I've updated substrate.h in /include/ and libsubstrate.dylib in /lib/
If I try to "make package" on my tweak for SpringBoard, where in Tweak.xm I do:
#import <SpringBoard/Springboard.h>
I get these errors:
iPhone-di-Gabriele:/var/mobile/mytweak root# make package
/var/mobile/mytweak/theos/makefiles/targets/Darwin-arm/iphone.mk:43: Targeting iOS 4.0 and higher is not supported with iphone-gcc. Forcing clang.
/var/mobile/mytweak/theos/makefiles/targets/Darwin-arm/iphone.mk:53: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for tweak mytweak...
Preprocessing Tweak.xm...
Compiling Tweak.xm...
In file included from Tweak.xm:1:
/var/mobile/mytweak/theos/include/SpringBoard.h:33:19: error: field has incomplete type 'struct CGSize'
struct CGSize size;
^
/var/mobile/mytweak/theos/include/SpringBoard.h:33:12: note: forward declaration of 'CGSize'
struct CGSize size;
^
/var/mobile/mytweak/theos/include/SpringBoard.h:229:34: error: cannot find protocol declaration for 'NSObject'
#protocol APSConnectionDelegate <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:233:37: error: cannot find protocol declaration for 'NSObject'
#protocol AVExternalDeviceDelegate <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:236:27: error: cannot find protocol declaration for
'BBSectionIdentity'
#protocol BBDataProvider <BBSectionIdentity>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:240:31: error: cannot find protocol declaration for 'NSObject'
#protocol BBObserverDelegate <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:246:30: error: cannot find protocol declaration for 'NSObject'
#protocol BBSectionIdentity <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:250:41: error: cannot find protocol declaration for 'NSObject'
#protocol BSSettingDescriptionProvider <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:255:34: error: cannot find protocol declaration for 'NSObject'
#protocol BSTransactionObserver <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:258:31: error: cannot find protocol declaration for 'NSObject'
#protocol BSWatchdogDelegate <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:261:38: error: cannot find protocol declaration for 'NSObject'
#protocol CLLocationManagerDelegate <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:264:41: error: cannot find protocol declaration for 'NSObject'
#protocol FBApplicationLibraryObserver <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:267:45: error: cannot find protocol declaration for 'NSObject'
#protocol FBApplicationPlaceholderObserver <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:270:41: error: cannot find protocol declaration for
'FBProcessObserver'
#protocol FBApplicationProcessObserver <FBProcessObserver>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:276:37: error: cannot find protocol declaration for 'NSObject'
#protocol FBDisplayManagerObserver <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:279:37: error: cannot find protocol declaration for 'NSObject'
#protocol FBProcessManagerObserver <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:284:30: error: cannot find protocol declaration for 'NSObject'
#protocol FBProcessObserver <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:287:35: error: cannot find protocol declaration for 'NSObject'
#protocol FBSceneManagerDelegate <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:293:35: error: cannot find protocol declaration for 'NSObject'
#protocol FBSceneManagerObserver <NSObject>
^
/var/mobile/mytweak/theos/include/SpringBoard.h:302:46: error: cannot find protocol declaration for 'NSObject'
#protocol FBSynchronizedTransactionDelegate <NSObject>
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [obj/Tweak.xm.0ad6af3a.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [mytweak.all.tweak.variables] Error 2
I really don't know where is the mistake, I really tried everything, also "make -i" but it doesn't create the dylib file!
Also using my dumped headers, for SpringBoard, I get:
iPhone-di-Gabriele:/var/mobile/test root# make package
/var/mobile/test/theos/makefiles/targets/Darwin-arm/iphone.mk:43: Targeting iOS 4.0 and higher is not supported with iphone-gcc. Forcing clang.
/var/mobile/test/theos/makefiles/targets/Darwin-arm/iphone.mk:53: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for tweak test...
Preprocessing Tweak.xm...
Compiling Tweak.xm...
In file included from Tweak.xm:1:
In file included from /var/mobile/test/theos/include/SpringBoard/SpringBoard.h:9:
In file included from /var/mobile/test/theos/include/SpringBoard/SBBannerContainerViewController.h:8:
In file included from /var/mobile/test/theos/include/SpringBoard/UIViewControllerAnimatedTransitioning.h:8:
In file included from /var/mobile/test/theos/include/SpringBoard/NSObject.h:8:
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:26:2: error:
unknown type name 'BOOL'
BOOL _field1;
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:27:2: error:
unknown type name 'BOOL'
BOOL _field2;
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:28:2: error:
unknown type name 'BOOL'
BOOL _field3;
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:29:2: error:
unknown type name 'BOOL'
BOOL _field4;
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:30:2: error:
unknown type name 'BOOL'
BOOL _field5;
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:66:2: error:
unknown type name 'BOOL'
BOOL itemIsEnabled[25];
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:67:2: error:
unknown type name 'BOOL'
BOOL timeString[64];
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:70:2: error:
unknown type name 'BOOL'
BOOL serviceString[100];
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:71:2: error:
unknown type name 'BOOL'
BOOL serviceCrossfadeString[100];
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:72:2: error:
unknown type name 'BOOL'
BOOL serviceImages[2][100];
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:73:2: error:
unknown type name 'BOOL'
BOOL operatorDirectory[1024];
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:80:2: error:
unknown type name 'BOOL'
BOOL batteryDetailString[150];
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:86:2: error:
unknown type name 'BOOL'
BOOL activityDisplayId[256];
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:102:2: error:
unknown type name 'BOOL'
BOOL _field3[4088];
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:116:2: error:
unknown type name 'BOOL'
BOOL __opaque[40];
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:162:2: error:
unknown type name 'BOOL'
BOOL valid;
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:179:2: error:
unknown type name 'BOOL'
BOOL isValid;
^
In file included from Tweak.xm:1:
In file included from /var/mobile/test/theos/include/SpringBoard/SpringBoard.h:9:
In file included from /var/mobile/test/theos/include/SpringBoard/SBBannerContainerViewController.h:8:
In file included from /var/mobile/test/theos/include/SpringBoard/UIViewControllerAnimatedTransitioning.h:8:
/var/mobile/test/theos/include/SpringBoard/NSObject.h:10:1: error: redefinition
of 'NSString' as different kind of symbol
#class NSString;
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:135:3: note:
previous definition is here
} NSString;
^
In file included from Tweak.xm:1:
In file included from /var/mobile/test/theos/include/SpringBoard/SpringBoard.h:9:
In file included from /var/mobile/test/theos/include/SpringBoard/SBBannerContainerViewController.h:8:
In file included from /var/mobile/test/theos/include/SpringBoard/UIViewControllerAnimatedTransitioning.h:8:
/var/mobile/test/theos/include/SpringBoard/NSObject.h:24:3: error: expected a
type
-(BOOL)respondsToSelector:(SEL)selector;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [obj/Tweak.xm.56f06e0e.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [test.all.tweak.variables] Error 2
Thank you to everyone who wants to help me.

If you get these errors, make sure you have not extracted, or copied SDK folder (iPhoneOSX.X.sdk) on Windows, because in this way you will lose every (symbolic) link between sdk's files. So manage and organize your sdk folder on Mac OS, iOS or Linux (but I didn't tried on this one).
Good Luck!

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

puma gem and ssl errors while doing bundle install

I am running bundle install to gems but it is failing for some gems.
Currently, it's breaking for puma gem (An error occurred while installing puma (3.6.0), and Bundler cannot continue).
these are the logs for the same
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/pusingh/.rvm/gems/ruby-2.3.7#pm/extensions/x86_64-darwin-19/2.3.0/puma-3.6.0/mkmf.log
current directory: /Users/pusingh/.rvm/gems/ruby-2.3.7#pm/gems/puma-3.6.0/ext/puma_http11
make "DESTDIR=" clean
current directory: /Users/pusingh/.rvm/gems/ruby-2.3.7#pm/gems/puma-3.6.0/ext/puma_http11
make "DESTDIR="
compiling http11_parser.c
ext/puma_http11/http11_parser.rl:111:17: warning: comparison of integers of different signs: 'long' and 'unsigned long'
[-Wsign-compare]
assert(pe - p == len - off && "pointers aren't same distance");
~~~~~~ ^ ~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
ext/puma_http11/http11_parser.c:43:18: warning: unused variable 'puma_parser_en_main' [-Wunused-const-variable]
static const int puma_parser_en_main = 1;
^
2 warnings generated.
compiling io_buffer.c
compiling mini_ssl.c
mini_ssl.c:90:5: error: incomplete definition of type 'struct dh_st'
dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
^
mini_ssl.c:91:5: error: incomplete definition of type 'struct dh_st'
dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
^
mini_ssl.c:93:10: error: incomplete definition of type 'struct dh_st'
if ((dh->p == NULL) || (dh->g == NULL)) {
~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
^
mini_ssl.c:93:29: error: incomplete definition of type 'struct dh_st'
if ((dh->p == NULL) || (dh->g == NULL)) {
~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
^
mini_ssl.c:197:27: warning: 'DTLSv1_method' is deprecated [-Wdeprecated-declarations]
conn->ctx = SSL_CTX_new(DTLSv1_method());
^
/usr/local/opt/openssl/include/openssl/ssl.h:1895:1: note: 'DTLSv1_method' has been explicitly marked deprecated here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_method(void)) /* DTLSv1.0 */
^
/usr/local/opt/openssl/include/openssl/opensslconf.h:155:34: note: expanded from macro 'DEPRECATEDIN_1_1_0'
# define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f)
^
/usr/local/opt/openssl/include/openssl/opensslconf.h:118:55: note: expanded from macro 'DECLARE_DEPRECATED'
# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
^
mini_ssl.c:233:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int verify_err = SSL_get_verify_result(ssl);
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
mini_ssl.c:246:13: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
err = ERR_get_error();
~ ^~~~~~~~~~~~~~~
3 warnings and 4 errors generated.
make: *** [mini_ssl.o] Error 1
make failed, exit code 2
I am using ruby 2.3.7 with catalina mac os 10.15.5 Please help

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

EGlib 2.6.20 does not install (trying to install SCIP)

I am trying to solve an integer linear program using SCIP. The beta version that I require (for exact solving) is given at:
http://scip.zib.de/#exact
As linked there, the source code is at:
http://scip.zib.de/download.php?fname=scip-3.0.0-ex.tgz
I followed the INSTALL file. It requires the installation of EGlib 2.6.20. However, this installation fails during 'make' with the following error:
phani#OptiPlex-9030-AIO ~/EGlib-2.6.20 $ make
make[1]: Entering directory '/home/phani/EGlib-2.6.20'
make[1]: Leaving directory '/home/phani/EGlib-2.6.20'
make[1]: Entering directory '/home/phani/EGlib-2.6.20'
Building include/EGlib.h
Compiling src/eg_bit.c
Compiling src/eg_compare.c
Compiling src/eg_io.c
src/eg_io.c: In function ‘EGioGets’:
src/eg_io.c:618:7: warning: unused variable ‘b’ [-Wunused-variable]
char*b = buf;
^
src/eg_io.c: In function ‘EGioEof’:
src/eg_io.c:648:6: warning: unused variable ‘err’ [-Wunused-variable]
int err;
^
src/eg_io.c: In function ‘EGmvar’:
src/eg_io.c:42:2: warning: second parameter of ‘va_start’ not last named argument [-Wvarargs]
va_start (largs, nind);
^
Compiling src/eg_lpnum.c
Compiling src/eg_net.c
Compiling src/eg_random.c
Compiling src/eg_macros.c
Compiling src/eg_ehash.c
Compiling src/eg_perm_it.c
Compiling src/eg_symtab.c
Compiling src/eg_keytab.c
Compiling src/eg_simula.c
In file included from src/eg_simula.c:25:0:
src/eg_simula.h:227:2: error: unknown type name ‘dbl_EGeHeapCn_t’
dbl_EGeHeapCn_t heap_cn;/**< connector in the heap containing the agent */
^
src/eg_simula.h:240:2: error: unknown type name ‘dbl_EGeHeap_t’
dbl_EGeHeap_t hp; /**< Heap containing events to be processed */
^
src/eg_simula.c: In function ‘EGsimExp’:
src/eg_simula.c:29:30: warning: unused parameter ‘t’ [-Wunused-parameter]
double EGsimExp(const double t, void*const data)
^
src/eg_simula.c: In function ‘EGsimUniform’:
src/eg_simula.c:40:34: warning: unused parameter ‘t’ [-Wunused-parameter]
double EGsimUniform(const double t, void*const data)
^
src/eg_simula.c: In function ‘EGsimNormal’:
src/eg_simula.c:51:33: warning: unused parameter ‘t’ [-Wunused-parameter]
double EGsimNormal(const double t, void*const data)
^
In file included from src/eg_simula.c:25:0:
src/eg_simula.c: In function ‘EGsimNewEvent’:
src/eg_simula.h:277:2: warning: implicit declaration of function ‘dbl_EGeHeapCnInit’ [-Wimplicit-function-declaration]
dbl_EGeHeapCnInit(&(__EGsimA->heap_cn));\
^
src/eg_simula.c:73:2: note: in expansion of macro ‘EGsimSetAgent’
EGsimSetAgent(la,sim->cur_time + gen->gen(sim->cur_time,gen->data));
^
src/eg_simula.c:74:13: error: request for member ‘val’ in something not a structure or union
la->heap_cn.val = la->last_time;
^
src/eg_simula.c:77:12: error: request for member ‘sz’ in something not a structure or union
if(sim->hp.sz == sim->hp.max_sz)
^
src/eg_simula.c:77:26: error: request for member ‘max_sz’ in something not a structure or union
if(sim->hp.sz == sim->hp.max_sz)
^
src/eg_simula.c:78:3: warning: implicit declaration of function ‘dbl_EGeHeapResize’ [-Wimplicit-function-declaration]
dbl_EGeHeapResize(&(sim->hp),sim->hp.sz*2);
^
src/eg_simula.c:78:39: error: request for member ‘sz’ in something not a structure or union
dbl_EGeHeapResize(&(sim->hp),sim->hp.sz*2);
^
src/eg_simula.c:80:9: warning: implicit declaration of function ‘dbl_EGeHeapAdd’ [-Wimplicit-function-declaration]
rval = dbl_EGeHeapAdd(&(sim->hp),&(la->heap_cn));
^
In file included from src/eg_simula.h:47:0,
from src/eg_simula.c:25:
src/eg_simula.c:85:55: error: request for member ‘val’ in something not a structure or union
MESSAGE(EG_SIM_VERBOSE,"new Agent at %lf",la->heap_cn.val);
^
src/eg_macros.h:246:18: note: in definition of macro ‘MESSAGE’
fprintf(stderr,__VA_ARGS__);\
^
In file included from src/eg_simula.h:47:0,
from src/eg_simula.c:25:
src/eg_simula.c: In function ‘EGsim’:
src/eg_simula.c:284:22: warning: implicit declaration of function ‘dbl_EGeHeapGetMin’ [-Wimplicit-function-declaration]
ca = EGcontainerOf(dbl_EGeHeapGetMin(&(sim->hp)), EGsimAgent_t,heap_cn);
^
src/eg_macros.h:134:56: note: in definition of macro ‘EGcontainerOf’
typeof(((__type *)0)->__member) *const __EGcOf_ptr = (__ptr);\
^
src/eg_macros.h:134:55: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
typeof(((__type *)0)->__member) *const __EGcOf_ptr = (__ptr);\
^
src/eg_simula.c:284:8: note: in expansion of macro ‘EGcontainerOf’
ca = EGcontainerOf(dbl_EGeHeapGetMin(&(sim->hp)), EGsimAgent_t,heap_cn);
^
src/eg_simula.c:285:30: error: request for member ‘val’ in something not a structure or union
sim->cur_time = ca->heap_cn.val;
^
src/eg_simula.c:327:17: error: request for member ‘val’ in something not a structure or union
na->heap_cn.val = sim->cur_time + cn->gen(sim->cur_time,cn->data);
^
src/eg_simula.c:328:6: warning: implicit declaration of function ‘dbl_EGeHeapSiftUp’ [-Wimplicit-function-declaration]
dbl_EGeHeapSiftUp(&(sim->hp),&(na->heap_cn));
^
src/eg_simula.c:365:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time;
^
src/eg_simula.c:371:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time + nn->gen(sim->cur_time,nn->data);
^
src/eg_simula.c:377:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = DBL_MAX;
^
src/eg_simula.c:381:12: warning: implicit declaration of function ‘dbl_EGeHeapSiftDown’ [-Wimplicit-function-declaration]
rval = dbl_EGeHeapSiftDown(&(sim->hp),&(ca->heap_cn));
^
src/eg_simula.c:388:5: warning: implicit declaration of function ‘dbl_EGeHeapDel’ [-Wimplicit-function-declaration]
dbl_EGeHeapDel(&(sim->hp),&(ca->heap_cn));
^
src/eg_simula.c:429:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time;
^
src/eg_simula.c:433:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time + nn->gen(sim->cur_time,nn->data);
^
src/eg_simula.c:441:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = DBL_MAX;
^
Makefile.library:38: recipe for target 'obj/eg_simula.o' failed
make[1]: *** [obj/eg_simula.o] Error 1
make[1]: Leaving directory '/home/phani/EGlib-2.6.20'
Makefile:23: recipe for target 'library' failed
make: *** [library] Error 2
After some searching, I have noticed that dbl_EGeHeap_t is not defined in the source code, and that seems to be throwing errors.
On searching online, it seems to be the case that it was defined in EGlib 2.6.15 (https://conexo.dii.uchile.cl/SVN/EGlib/EGlib2/tags/EGlib-2.6.15/TEmplate/dbl_eg_eheap.h), but the corresponding file in 2.6.20 does not have the definition.
Has anybody else experienced this? I badly need a solution to this.

Resources