cmake and make unable to compile YAP in Fedora 23 - makefile

This is kind of a specific question, but, I am unable to get cmake and make to compile Yet Another Prolog in Fedora 23. Cloned the latest repo on Github, YAP 6.3.4. My friend ran cmake and make successfully on the identical clone on his Funtoo Linux. When I run them on Fedora 23, I get weird errors that would only make sense if CUDD headers were missing, but CUDD is installed with the header files.
I hope anyone has enough experience to offer a reason why a cmake-generated Makefile would fail to compile in one Linux system while compiling on another.
Here is a sample of the make errors (Makefile made with cmake with no errors). The "unknown" type name is in CUDD headers which are installed on my system. The source file cplint is supposed to be built using CUDD
% YAP 6.3.4-76638bb7 (compiled 2016-09-01T01:01:57#dhcp-129-8-62-64)
In file included from /home/safulop/yap-6.3/packages/cplint/cplint_yap.c:15:0:
/home/safulop/yap-6.3/packages/cplint/cplint.h:41:3: error: unknown type name ‘DdNode’
DdNode * * booleanVars;
^
/home/safulop/yap-6.3/packages/cplint/cplint.h:54:3: error: unknown type name ‘DdNode’
DdNode *key;
^
/home/safulop/yap-6.3/packages/cplint/cplint.h:64:33: error: unknown type name ‘DdManager’
variables createVars(YAP_Term t,DdManager * mgr, int create_dot,
^
/home/safulop/yap-6.3/packages/cplint/cplint.h:69:1: error: unknown type name ‘DdNode’
DdNode * retFunction(DdManager * mgr, expr expression,variables v);
^
/home/safulop/yap-6.3/packages/cplint/cplint.h:69:22: error: unknown type name ‘DdManager’
DdNode * retFunction(DdManager * mgr, expr expression,variables v);
^
/home/safulop/yap-6.3/packages/cplint/cplint.h:70:1: error: unknown type name ‘DdNode’
DdNode * retTerm(DdManager * mgr,term t,variables v);
^

As you said, the problem cames from the CUDD library. You need to fix the include directory folders of CUDD in the Makefile...

Related

PTHREAD_STACK_MIN causing problem in compiling buildroot

i'm trying to compile a Linux image with sysroot and cross-compiler by buildroot for ATSAMA5D27-WLSOM1 evaluation kit by Microchip.
I'm on a virtual machine (VBox) with Ubuntu 18.04.5 LTS.
I'm following this guide: https://microchip.wikidot.com/32mpu:egt-prepare#prepHost
I arrived at point 6, but there are some errors in compilation, the one I can't solve is the following one:
In file included from /home/ubuntu4sam/buildroot/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.3.0/include-fixed/pthread.h:42,
from work_thread.c:13:
work_thread.c:45:58: error: missing binary operator before token "("
45 | #if defined (PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN
| ^~~~~~~~~~~~~~~~~
I tried to comment the second condition (THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN) and the error becomes:
work_thread.c:45:58: error: missing binary operator before token "("
45 | #if defined (PTHREAD_STACK_MIN)
so the problem must be PTHREAD_STACK_MIN. I hope someone else has worked on Microchip boards.
Thanks for reading.

SynCrypto.pas and Lazarus compile problem

I'm trying to use SynCrypto.pas (part of Synopse mORMot ORM/SOA/MVC framework) in my Lazarus project to decrypt AES-128 stream. My project not compiling with errors in SynFPCTypInfo at this code:
PFPCInterfaceData = TypInfo.PInterfaceData;
PFPCVmtMethodParam = TypInfo.PVmtMethodParam;
PFPCIntfMethodTable = TypInfo.PIntfMethodTable;
PFPCIntfMethodEntry = TypInfo.PIntfMethodEntry;
SynFPCTypInfo.pas(91,31) Error: Identifier not found "PInterfaceData"
SynFPCTypInfo.pas(91,45) Error: Error in type definition
SynFPCTypInfo.pas(92,32) Error: Identifier not found "PVmtMethodParam"
SynFPCTypInfo.pas(92,47) Error: Error in type definition
SynFPCTypInfo.pas(93,33) Error: Identifier not found "PIntfMethodTable"
SynFPCTypInfo.pas(93,49) Error: Error in type definition
SynFPCTypInfo.pas(94,33) Error: Identifier not found "PIntfMethodEntry"
SynFPCTypInfo.pas(94,49) Error: Error in type definition
I think that it's incompatibility with Delphi TypInfo module. How can I fix it?
So ... I suggest you to install the new pascal: https://github.com/newpascal/newpascal/releases/tag/np-v1.0.56, download the zip and unzip it in some folder, for example (D: \ lazarus \ newpascal), and configure the paths according to the mORMot site: For proper FPC compilation, ensure you have the following settings to your project:
Other unit files (-Fu):
D:\lazarus\newpascal\ccr\mORMot;D:\lazarus\newpascal\ccr\mORMot\SQLite3;D:\lazarus\newpascal\ccr\mORMot\SQLite3\DDD\infra\
Include files (-Fi):
$(ProjOutDir);D:\lazarus\newpascal\ccr\mORMot;D:\lazarus\newpascal\ccr\mORMot\SQLite3\
Libraries (-fFl):
D:\lazarus\newpascal\ccr\mORMot\static$(TargetCPU)-$(TargetOS)\
site: https: //synopse.info/files/html/Synopse%20mORMot%20Framework%20SAD%201.18.html#TITL_113, then you will have at least how to test your app.

Error installing a .pro file, with Eigen, libigl dependencies on Debian

Im trying to install a .pro file using 'make' on Debian-9. The dependencies are Qt5, GSL, libigl, Eigen and Boost, which their latest versions are installed.
I used the following:
# cd build
# qmake -qt=qt5 ../qt/myfile.pro
# make
And here is the error I get:
../libigl/include/igl/copyleft/boolean/../cgal/order_facets_around_edge.cpp:203:36: error: ‘Eigen::PlainObjectBase<Derived>::PlainObjectBase() [with Derived = Eigen::Matrix<int, -1, 1>]’ is protected within this context
Eigen::PlainObjectBase<DerivedI> positive_order, negative_order;
^~~~~~~~~~~~~~
In file included from /usr/local/include/eigen3/Eigen/Core:457:0,
from ../libigl/include/igl/copyleft/boolean/mesh_boolean.h:15,
from ../src/mesh.cpp:12:
/usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h:484:25: note: declared protected here
EIGEN_STRONG_INLINE PlainObjectBase() : m_storage()
^~~~~~~~~~~~~~~
In file included from ../libigl/include/igl/copyleft/boolean/../cgal/order_facets_around_edge.h:75:0,
from ../libigl/include/igl/copyleft/boolean/../cgal/propagate_winding_numbers.cpp:18,
from ../libigl/include/igl/copyleft/boolean/../cgal/propagate_winding_numbers.h:101,
from ../libigl/include/igl/copyleft/boolean/mesh_boolean.cpp:13,
from ../libigl/include/igl/copyleft/boolean/mesh_boolean.h:172,
from ../src/mesh.cpp:12:
../libigl/include/igl/copyleft/boolean/../cgal/order_facets_around_edge.cpp:203:52: error: ‘Eigen::PlainObjectBase<Derived>::PlainObjectBase() [with Derived = Eigen::Matrix<int, -1, 1>]’ is protected within this context
Eigen::PlainObjectBase<DerivedI> positive_order, negative_order;
^~~~~~~~~~~~~~
In file included from /usr/local/include/eigen3/Eigen/Core:457:0,
from ../libigl/include/igl/copyleft/boolean/mesh_boolean.h:15,
from ../src/mesh.cpp:12:
/usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h:484:25: note: declared protected here
EIGEN_STRONG_INLINE PlainObjectBase() : m_storage()
^~~~~~~~~~~~~~~
Makefile:891: recipe for target 'mesh.o' failed
Could someone please kindly help me solving the issue here?
This line
Eigen::PlainObjectBase<DerivedI> positive_order, negative_order;
won't compile. It may have once compiled for older Eigen versions -- but this is not how Eigen-Base types are supposed to be used, so it likely was never working as intended (that is also the reason why Base-constructors where made protected in Eigen).
However, that line does not exist in the most recent order_facets_around_edge.cpp, so you appear to be using an outdated libigl version.

size of array '__curl_rule_01__' is negative

I'm struggling with an error whilst trying to compile GIT. I've searched Google and the GIT source issues/bugs for similar issues but i've not found anything to help me.
Originally I received the following error
root#teemo:/usr/src/git# make prefix=/usr install install-doc install-html install-info;
CC http-push.o
In file included from cache.h:39:0,
from http-push.c:1:
/usr/include/zlib.h:34:19: fatal error: zconf.h: No such file or directory
#include "zconf.h"
^
compilation terminated.
make: *** [http-push.o] Error 1
I created a symbolic link inside /usr/include/ to the missing file as follows (after I had installed/compiled the latest/development version)
root#teemo:/usr/src/git# ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/include
Which brings me to the current issue, which I am confused as to how to solve. If someone could advise it would be greatly appreciated.
root#teemo:/usr/src/git# make prefix=/usr install install-doc install-html install-info;
CC http-push.o
In file included from /usr/include/curl/curl.h:35:0,
from http.h:6,
from http-push.c:5:
/usr/include/curl/curlrules.h:142:3: error: size of array '__curl_rule_01__' is negative
__curl_rule_01__
^
/usr/include/curl/curlrules.h:152:3: error: size of array '__curl_rule_02__' is negative
__curl_rule_02__
^
make: *** [http-push.o] Error 1
Read higher up in curlrules.h. That error is intentionally forced as part of a test that checks the size of data types.
* NOTE 2
* ------
*
* Some of the following compile time checks are based on the fact
* that the dimension of a constant array can not be a negative one.
* In this way if the compile time verification fails, the compilation
* will fail issuing an error. The error description wording is compiler
* dependent but it will be quite similar to one of the following:
*
* "negative subscript or subscript is too large"
* "array must have at least one element"
* "-1 is an illegal array size"
* "size of array is negative"
*
* If you are building an application which tries to use an already
* built libcurl library and you are getting this kind of errors on
* this file, it is a clear indication that there is a mismatch between
* how the library was built and how you are trying to use it for your
* application. Your already compiled or binary library provider is the
* only one who can give you the details you need to properly use it.
Your version of libcurl was built with different options than you're using in your current git build. (it could be 32 vs 64 bit)
Knowing what platform you're on and your build options might be enough others to help resolve it. If this is the common case, and you're on Linux or another supported platform, it'd be easier just to install a prebuilt binary using the native software management. Git downloads
In case system reports __curl_rule_01__ or __curl_rule_02__ is negative make the following changes to /usr/include/curl/curlbuild.h:
Add the following lines:
define CURL_SIZEOF_LONG 4
define CURL_SIZEOF_CURL_OFF_T 4
(Or replace similar lines if these are already defined)

int8 header file not found during compilation

Trying to compile a simple c program and get error.
In file included from /opt/local/lib/gcc47/gcc/x86_64-apple- darwin13/4.7.3/include/stdint.h:3:0,
from ecl/config.h:134,
from ecl/ecl.h:35,
from main.c:2:
/opt/local/lib/gcc47/gcc/x86_64-apple-darwin13/4.7.3/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
compilation terminated.
What is this error and how can I fix it? From what I gather int8 etc. is typedefined in stdint.h but there's no mention of it in types.h or _types.h. Do I just add these definitions in there or... really lost here.
You have to install IBM® Informix® ESQL/C.
The following BIGINT functionality is available only to users of IBM® Informix® ESQL/C. To use these functions, ESQL/C users will need to manually link their C code to the ESQL/C libraries.
Ref - https://www.ibm.com/docs/en/rbd/9.5.1?topic=libraries-bigint-functions-c
and https://www.ibm.com/docs/en/informix-servers/14.10?topic=programming-esqlc-header-files

Resources