How to compile NuSMV 2.6.0 from source - gcc

I am trying to compile the software NuSMV 2.6.0 from source.
I clone the repo https://github.com/hklarner/NuSMV-a
I follow instructions in README.md:
cd NuSMV-2.6.0/NuSMV/
mkdir build
cd build
cmake ..
make
but I get the following error:
[ 16%] Building C object build-cudd/util/CMakeFiles/CUDD_UTIL_LIB.dir/getopt.c.o
[ 16%] Building C object build-cudd/util/CMakeFiles/CUDD_UTIL_LIB.dir/safe_mem.c.o
[ 16%] Building C object build-cudd/util/CMakeFiles/CUDD_UTIL_LIB.dir/strsav.c.o
[ 16%] Building C object build-cudd/util/CMakeFiles/CUDD_UTIL_LIB.dir/texpand.c.o
[ 17%] Building C object build-cudd/util/CMakeFiles/CUDD_UTIL_LIB.dir/ptime.c.o
[ 17%] Building C object build-cudd/util/CMakeFiles/CUDD_UTIL_LIB.dir/prtime.c.o
[ 17%] Building C object build-cudd/util/CMakeFiles/CUDD_UTIL_LIB.dir/pipefork.c.o
NuSMV-a/NuSMV-2.6.0/cudd-2.4.1.1/util/pipefork.c: In function ‘util_pipefork’:
NuSMV-a/NuSMV-2.6.0/cudd-2.4.1.1/util/pipefork.c:46:16: error: storage size of ‘status’ isn’t known
46 | union wait status;
| ^~~~~~
NuSMV-a/NuSMV-2.6.0/cudd-2.4.1.1/util/pipefork.c:53:12: warning: implicit declaration of function ‘pipe’ [-Wimplicit-function-declaration]
53 | (void) pipe(topipe);
| ^~~~
NuSMV-a/NuSMV-2.6.0/cudd-2.4.1.1/util/pipefork.c:59:20: warning: implicit declaration of function ‘vfork’ [-Wimplicit-function-declaration]
59 | if ((forkpid = vfork()) == 0) {
| ^~~~~
NuSMV-a/NuSMV-2.6.0/cudd-2.4.1.1/util/pipefork.c:62:9: warning: implicit declaration of function ‘dup2’ [-Wimplicit-function-declaration]
62 | (void) dup2(topipe[0], fileno(stdin));
| ^~~~
NuSMV-a/NuSMV-2.6.0/cudd-2.4.1.1/util/pipefork.c:65:9: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
65 | (void) close(topipe[0]);
| ^~~~~
| pclose
NuSMV-a/NuSMV-2.6.0/cudd-2.4.1.1/util/pipefork.c:70:9: warning: implicit declaration of function ‘execvp’ [-Wimplicit-function-declaration]
70 | (void) execvp(argv[0], argv);
| ^~~~~~
NuSMV-a/NuSMV-2.6.0/cudd-2.4.1.1/util/pipefork.c:73:9: warning: implicit declaration of function ‘_exit’ [-Wimplicit-function-declaration]
73 | (void) _exit(1);
| ^~~~~
NuSMV-a/NuSMV-2.6.0/cudd-2.4.1.1/util/pipefork.c:73:9: warning: incompatible implicit declaration of built-in function ‘_exit’
make[2]: *** [build-cudd/util/CMakeFiles/CUDD_UTIL_LIB.dir/build.make:167: build-cudd/util/CMakeFiles/CUDD_UTIL_LIB.dir/pipefork.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2174: build-cudd/util/CMakeFiles/CUDD_UTIL_LIB.dir/all] Error 2
I am on Ubuntu 20.04 LTS. I have no idea what I could do to fix this. It used to work.
Can anyone help?

Related

make: *** [Makefile:223: v8js_array_access.lo] Error 1

I followed this link to compile v8 and v8js but when I executed make to compile v8js it showed this log and this error:
/bin/bash /tmp/v8js/libtool --mode=compile g++ -I. -I/tmp/v8js -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -I/opt/v8/include -I/opt/v8 -DV8_COMPRESS_POINTERS -DHAVE_CONFIG_H -g -O2 -Wno-narrowing -std=c++14 -c /tmp/v8js/v8js_array_access.cc -o v8js_array_access.lo
libtool: compile: g++ -I. -I/tmp/v8js -I/tmp/v8js/include -I/tmp/v8js/main -I/tmp/v8js -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -I/opt/v8/include -I/opt/v8 -DV8_COMPRESS_POINTERS -DHAVE_CONFIG_H -g -O2 -Wno-narrowing -std=c++14 -c /tmp/v8js/v8js_array_access.cc -fPIC -DPIC -o .libs/v8js_array_access.o
In file included from /usr/include/dirent.h:245,
from /usr/include/php/20200930/Zend/zend_virtual_cwd.h:89,
from /usr/include/php/20200930/main/php.h:437,
from /tmp/v8js/php_v8js_macros.h:45,
from /tmp/v8js/v8js_array_access.cc:17:
/tmp/v8js/v8js_class.h: In function ‘v8js_ctx* v8js_ctx_fetch_object(zend_object*)’:
/tmp/v8js/v8js_class.h:83:54: warning: ‘offsetof’ within non-standard-layout type ‘v8js_ctx’ is conditionally-supported [-Winvalid-offsetof]
83 | return (struct v8js_ctx *)((char *)obj - XtOffsetOf(struct v8js_ctx, std));
/tmp/v8js/v8js_class.h:83:43: note: in expansion of macro ‘XtOffsetOf’
83 | return (struct v8js_ctx *)((char *)obj - XtOffsetOf(struct v8js_ctx, std));
| ^~~~~~~~~~
/tmp/v8js/v8js_array_access.cc: In function ‘zval v8js_array_access_dispatch(zend_object*, const char*, int, uint32_t, zval)’:
/tmp/v8js/v8js_array_access.cc:53:6: error: ‘zend_fcall_info’ {aka ‘struct _zend_fcall_info’} has no member named ‘no_separation’
53 | fci.no_separation = 0;
| ^~~~~~~~~~~~~
/tmp/v8js/v8js_array_access.cc: In function ‘void v8js_array_access_enumerator(const v8::PropertyCallbackInfo<v8::Array>&)’:
/tmp/v8js/v8js_array_access.cc:213:74: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’, declared with attribute ‘warn_unused_result’ [-Wunused-result]
213 | esult->Set(isolate->GetEnteredOrMicrotaskContext(), i ++, V8JS_INT(j));
| ^
In file included from /tmp/v8js/php_v8js_macros.h:55,
from /tmp/v8js/v8js_array_access.cc:17:
/opt/v8/include/v8.h:3943:37: note: declared here
3943 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
| ^~~
/tmp/v8js/v8js_array_access.cc:217:86: warning: ignoring return value of ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’, declared with attribute ‘warn_unused_result’ [-Wunused-result]
217 | late->GetEnteredOrMicrotaskContext(), V8JS_SYM("length"), V8JS_INT(i));
| ^
In file included from /tmp/v8js/php_v8js_macros.h:55,
from /tmp/v8js/v8js_array_access.cc:17:
/opt/v8/include/v8.h:3940:37: note: declared here
3940 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
| ^~~
/tmp/v8js/v8js_array_access.cc: In function ‘void v8js_array_access_named_getter(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&)’:
/tmp/v8js/v8js_array_access.cc:253:83: warning: ignoring return value of ‘bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const [with S = v8::Value; T = v8::Value]’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
253 | t(isolate->GetEnteredOrMicrotaskContext(), property).ToLocal(&ret_value);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
make: *** [Makefile:223: v8js_array_access.lo] Error 1
My PHP version: 8.0.5

Installing Kannel SMS gateway1.5.0 on Ubuntu 20.04.1

I was able to compiled the gateway but I got the error below running the make command.
gcc -D_REENTRANT=1 -I. -Igw -g -O2 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_LARGE_FILES= -I/usr/include/libxml2 -I/usr/include/mysql -o gwlib/dbpool.o -c gwlib/dbpool.c
In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdlib.h:25,
from gwlib/gwlib.h:70,
from gwlib/dbpool.c:70:
/usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
In file included from gwlib/gwlib.h:83,
from gwlib/dbpool.c:70:
gwlib/dbpool_mysql.c: In function ‘mysql_select’:
gwlib/dbpool_mysql.c:224:48: error: ‘my_bool’ undeclared (first use in this function); did you mean ‘xr_bool’?
224 | bind[i].is_null = gw_malloc(sizeof(my_bool));
gwlib/gwmem.h:122:43: note: in definition of macro ‘gw_malloc’
122 | #define gw_malloc(size) (gw_native_malloc(size))|
gwlib/dbpool_mysql.c:224:48: note: each undeclared identifier is reported only once for each function it appears in
224 | bind[i].is_null = gw_malloc(sizeof(my_bool));
gwlib/gwmem.h:122:43: note: in definition of macro ‘gw_malloc’
122 | #define gw_malloc(size) (gw_native_malloc(size))
make: *** [Makefile:230: gwlib/dbpool.o] Error 1`
This error comes when you're compiling with mysql 8
To fix this, add these lines to gwlib/dbpool_mysql.c
/* define my_bool for newer versions because they use the bool or int C type instead */
#if MYSQL_VERSION_ID >= 80000 && !defined(MARIADB_BASE_VERSION)
typedef bool my_bool;
#endif

How to fix error that occurred while building CXX object CMakeFiles/tvm_objs.dir/src/target/llvm/codegen_llvm.cc.o?

I've built LLVM from source following these instructions and now I am attempting to build TVM from source according to the instructions in this official website
I do the cmake3 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ .. command
and get the following output
-- Build with RPC support...
-- Build with Graph runtime support...
-- Build with Graph runtime debug support...
-- VTA build with VTA_HW_PATH=/research/d1/lj2001/tvm/3rdparty/vta-hw
-- Build VTA runtime with target: sim
-- Found CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
-- Found CUDA_CUDA_LIBRARY=/usr/local/cuda/targets/x86_64-linux/lib/stubs/libcuda.so
-- Found CUDA_CUDART_LIBRARY=/usr/local/cuda/lib64/libcudart.so
-- Found CUDA_NVRTC_LIBRARY=/usr/local/cuda/lib64/libnvrtc.so
-- Found CUDA_CUDNN_LIBRARY=/usr/local/cuda/lib64/libcudnn.so
-- Found CUDA_CUBLAS_LIBRARY=/usr/local/cuda/lib64/libcublas.so
-- Found CUDA_CUBLASLT_LIBRARY=/usr/local/cuda/lib64/libcublasLt.so
-- Build with CUDA support
-- Use llvm-config=/research/d1/lj2001/llvm/bin/llvm-config
-- Found LLVM_INCLUDE_DIRS=/research/d1/lj2001/llvm/include
-- Found LLVM_DEFINITIONS=-D_GNU_SOURCE;-D_DEBUG;-D__STDC_CONSTANT_MACROS;-D__STDC_FORMAT_MACROS;-D__STDC_LIMIT_MACROS
...
-- Found TVM_LLVM_VERSION=120
-- Build with LLVM
-- Set TVM_LLVM_VERSION=120
-- Build with contrib.random
-- Build with contrib.sort
-- Build with contrib.hybriddump
-- Git found: /bin/git
-- Found TVM_GIT_COMMIT_HASH=27abfadc55e79e3d40b7de7d4b87eb87a19b7b97
-- Performing Test SUPPORT_CXX14
-- Performing Test SUPPORT_CXX14 - Success
-- Building with TVM Map...
-- Build with thread support...
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /research/d1/lj2001/tvm/build
But when I run make -j24 I get the following output:
Scanning dependencies of target tvm_runtime_objs
Scanning dependencies of target tvm_objs
[ 10%] Built target tvm_runtime_objs
Scanning dependencies of target tvm_runtime
[ 10%] Linking CXX shared library libtvm_runtime.so
[ 10%] Built target tvm_runtime
[ 10%] Building CXX object CMakeFiles/tvm_objs.dir/src/target/llvm/codegen_llvm.cc.o
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc: In member function ‘llvm::Value* tvm::codegen::CodeGenLLVM::CreateBroadcast(llvm::Value*, int)’:
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:480:82: error: ‘llvm::ElementCount::ElementCount(unsigned int, bool)’ is private within this context
480 | llvm::ConstantVector::getSplat(llvm::ElementCount(lanes, /*Scalable=*/false), zero);
| ^
In file included from /research/d1/lj2001/llvm/include/llvm/IR/Type.h:24,
from /research/d1/lj2001/llvm/include/llvm/IR/DerivedTypes.h:23,
from /research/d1/lj2001/llvm/include/llvm/IR/Constants.h:31,
from /research/d1/lj2001/llvm/include/llvm/IR/Operator.h:19,
from /research/d1/lj2001/llvm/include/llvm/Analysis/TargetTransformInfo.h:24,
from /research/d1/lj2001/tvm/src/target/llvm/llvm_common.h:33,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.h:49,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:25:
/research/d1/lj2001/llvm/include/llvm/Support/TypeSize.h:39:3: note: declared private here
39 | ElementCount(unsigned Min, bool Scalable) : Min(Min), Scalable(Scalable) {}
| ^~~~~~~~~~~~
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc: In member function ‘llvm::Value* tvm::codegen::CodeGenLLVM::CreateVecSlice(llvm::Value*, int, int)’:
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:488:80: warning: ‘unsigned int llvm::VectorType::getNumElements() const’ is deprecated [-Wdeprecated-declarations]
488 | int num_elems = llvm::cast<llvm::VectorType>(vec->getType())->getNumElements();
| ^
In file included from /research/d1/lj2001/llvm/include/llvm/IR/Constants.h:31,
from /research/d1/lj2001/llvm/include/llvm/IR/Operator.h:19,
from /research/d1/lj2001/llvm/include/llvm/Analysis/TargetTransformInfo.h:24,
from /research/d1/lj2001/tvm/src/target/llvm/llvm_common.h:33,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.h:49,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:25:
/research/d1/lj2001/llvm/include/llvm/IR/DerivedTypes.h:534:10: note: declared here
534 | unsigned VectorType::getNumElements() const {
| ^~~~~~~~~~
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc: In member function ‘llvm::Value* tvm::codegen::CodeGenLLVM::CreateVecFlip(llvm::Value*)’:
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:504:80: warning: ‘unsigned int llvm::VectorType::getNumElements() const’ is deprecated [-Wdeprecated-declarations]
504 | int num_elems = llvm::cast<llvm::VectorType>(vec->getType())->getNumElements();
| ^
In file included from /research/d1/lj2001/llvm/include/llvm/IR/Constants.h:31,
from /research/d1/lj2001/llvm/include/llvm/IR/Operator.h:19,
from /research/d1/lj2001/llvm/include/llvm/Analysis/TargetTransformInfo.h:24,
from /research/d1/lj2001/tvm/src/target/llvm/llvm_common.h:33,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.h:49,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:25:
/research/d1/lj2001/llvm/include/llvm/IR/DerivedTypes.h:534:10: note: declared here
534 | unsigned VectorType::getNumElements() const {
| ^~~~~~~~~~
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc: In member function ‘llvm::Value* tvm::codegen::CodeGenLLVM::CreateVecPad(llvm::Value*, int)’:
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:518:80: warning: ‘unsigned int llvm::VectorType::getNumElements() const’ is deprecated [-Wdeprecated-declarations]
518 | int num_elems = llvm::cast<llvm::VectorType>(vec->getType())->getNumElements();
| ^
In file included from /research/d1/lj2001/llvm/include/llvm/IR/Constants.h:31,
from /research/d1/lj2001/llvm/include/llvm/IR/Operator.h:19,
from /research/d1/lj2001/llvm/include/llvm/Analysis/TargetTransformInfo.h:24,
from /research/d1/lj2001/tvm/src/target/llvm/llvm_common.h:33,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.h:49,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:25:
/research/d1/lj2001/llvm/include/llvm/IR/DerivedTypes.h:534:10: note: declared here
534 | unsigned VectorType::getNumElements() const {
| ^~~~~~~~~~
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc: In member function ‘llvm::Value* tvm::codegen::CodeGenLLVM::CreateVecConcat(std::vector<llvm::Value*, std::allocator<llvm::Value*> >)’:
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:532:79: warning: ‘unsigned int llvm::VectorType::getNumElements() const’ is deprecated [-Wdeprecated-declarations]
532 | total_lanes += llvm::cast<llvm::VectorType>(v->getType())->getNumElements();
| ^
In file included from /research/d1/lj2001/llvm/include/llvm/IR/Constants.h:31,
from /research/d1/lj2001/llvm/include/llvm/IR/Operator.h:19,
from /research/d1/lj2001/llvm/include/llvm/Analysis/TargetTransformInfo.h:24,
from /research/d1/lj2001/tvm/src/target/llvm/llvm_common.h:33,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.h:49,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:25:
/research/d1/lj2001/llvm/include/llvm/IR/DerivedTypes.h:534:10: note: declared here
534 | unsigned VectorType::getNumElements() const {
| ^~~~~~~~~~
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:539:93: warning: ‘unsigned int llvm::VectorType::getNumElements() const’ is deprecated [-Wdeprecated-declarations]
539 | const size_t lhs_lanes = llvm::cast<llvm::VectorType>(lhs->getType())->getNumElements();
| ^
In file included from /research/d1/lj2001/llvm/include/llvm/IR/Constants.h:31,
from /research/d1/lj2001/llvm/include/llvm/IR/Operator.h:19,
from /research/d1/lj2001/llvm/include/llvm/Analysis/TargetTransformInfo.h:24,
from /research/d1/lj2001/tvm/src/target/llvm/llvm_common.h:33,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.h:49,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:25:
/research/d1/lj2001/llvm/include/llvm/IR/DerivedTypes.h:534:10: note: declared here
534 | unsigned VectorType::getNumElements() const {
| ^~~~~~~~~~
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:540:93: warning: ‘unsigned int llvm::VectorType::getNumElements() const’ is deprecated [-Wdeprecated-declarations]
540 | const size_t rhs_lanes = llvm::cast<llvm::VectorType>(rhs->getType())->getNumElements();
| ^
In file included from /research/d1/lj2001/llvm/include/llvm/IR/Constants.h:31,
from /research/d1/lj2001/llvm/include/llvm/IR/Operator.h:19,
from /research/d1/lj2001/llvm/include/llvm/Analysis/TargetTransformInfo.h:24,
from /research/d1/lj2001/tvm/src/target/llvm/llvm_common.h:33,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.h:49,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:25:
/research/d1/lj2001/llvm/include/llvm/IR/DerivedTypes.h:534:10: note: declared here
534 | unsigned VectorType::getNumElements() const {
| ^~~~~~~~~~
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc: In member function ‘virtual llvm::Value* tvm::codegen::CodeGenLLVM::CreateIntrinsic(const tvm::tir::CallNode*)’:
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:844:72: warning: ‘unsigned int llvm::VectorType::getNumElements() const’ is deprecated [-Wdeprecated-declarations]
844 | int l = llvm::cast<llvm::VectorType>(v->getType())->getNumElements();
| ^
In file included from /research/d1/lj2001/llvm/include/llvm/IR/Constants.h:31,
from /research/d1/lj2001/llvm/include/llvm/IR/Operator.h:19,
from /research/d1/lj2001/llvm/include/llvm/Analysis/TargetTransformInfo.h:24,
from /research/d1/lj2001/tvm/src/target/llvm/llvm_common.h:33,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.h:49,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:25:
/research/d1/lj2001/llvm/include/llvm/IR/DerivedTypes.h:534:10: note: declared here
534 | unsigned VectorType::getNumElements() const {
| ^~~~~~~~~~
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:848:72: warning: ‘unsigned int llvm::VectorType::getNumElements() const’ is deprecated [-Wdeprecated-declarations]
848 | int l = llvm::cast<llvm::VectorType>(v->getType())->getNumElements();
| ^
In file included from /research/d1/lj2001/llvm/include/llvm/IR/Constants.h:31,
from /research/d1/lj2001/llvm/include/llvm/IR/Operator.h:19,
from /research/d1/lj2001/llvm/include/llvm/Analysis/TargetTransformInfo.h:24,
from /research/d1/lj2001/tvm/src/target/llvm/llvm_common.h:33,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.h:49,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:25:
/research/d1/lj2001/llvm/include/llvm/IR/DerivedTypes.h:534:10: note: declared here
534 | unsigned VectorType::getNumElements() const {
| ^~~~~~~~~~
/research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:853:81: warning: ‘unsigned int llvm::VectorType::getNumElements() const’ is deprecated [-Wdeprecated-declarations]
853 | int num_elems = llvm::cast<llvm::VectorType>(v0->getType())->getNumElements() * 2;
| ^
In file included from /research/d1/lj2001/llvm/include/llvm/IR/Constants.h:31,
from /research/d1/lj2001/llvm/include/llvm/IR/Operator.h:19,
from /research/d1/lj2001/llvm/include/llvm/Analysis/TargetTransformInfo.h:24,
from /research/d1/lj2001/tvm/src/target/llvm/llvm_common.h:33,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.h:49,
from /research/d1/lj2001/tvm/src/target/llvm/codegen_llvm.cc:25:
/research/d1/lj2001/llvm/include/llvm/IR/DerivedTypes.h:534:10: note: declared here
534 | unsigned VectorType::getNumElements() const {
| ^~~~~~~~~~
make[2]: *** [CMakeFiles/tvm_objs.dir/src/target/llvm/codegen_llvm.cc.o] Error 1
make[1]: *** [CMakeFiles/tvm_objs.dir/all] Error 2
make: *** [all] Error 2
How do I fix this?

installing WordNet on Mac 10.9.2

I'm trying to install WordNet on Mac (OS 10.9.2). I have tried the following
./configure
make
But during make I got some errors. Then I have installed XQuartz-2.7.5. Still I got some error during make. Next, I have installed Xcode but still this dose not fix the problem. This question suggest to install Tcl/TK, which I tried but still I got the following error during make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in doc
Making all in html
make[3]: Nothing to be done for `all'.
Making all in man
make[3]: Nothing to be done for `all'.
Making all in pdf
make[3]: Nothing to be done for `all'.
Making all in ps
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in dict
make[2]: Nothing to be done for `all'.
Making all in include
Making all in tk
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in lib
Making all in wnres
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in src
if /usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../include -I/usr/local/include -I/usr/X11/include -I/usr/local/include -I.. -I../include -I/usr/local/include -I/usr/X11/include -I/usr/local/include -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -fpermissive -MT wishwn-stubs.o -MD -MP -MF ".deps/wishwn-stubs.Tpo" -c -o wishwn-stubs.o `test -f 'stubs.c' || echo './'`stubs.c; \
then mv -f ".deps/wishwn-stubs.Tpo" ".deps/wishwn-stubs.Po"; else rm -f ".deps/wishwn-stubs.Tpo"; exit 1; fi
clang: warning: -lX11: 'linker' input unused
clang: warning: argument unused during compilation: '-L/usr/X11R6/lib'
stubs.c:43:17: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result =
~~~~~~ ^
stubs.c:55:14: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = bitfieldstr;
~~~~~~ ^
stubs.c:72:17: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = "usage: bit bitnum";
~~~~~~ ^
stubs.c:78:14: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = bitfieldstr;
~~~~~~ ^
stubs.c:92:17: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result =
~~~~~~ ^
stubs.c:105:14: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = resultbuf;
~~~~~~ ^
stubs.c:117:17: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = "usage: glosses [1 | 0]";
~~~~~~ ^
stubs.c:132:17: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = "usage: fileinfo [1 | 0]";
~~~~~~ ^
stubs.c:147:17: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = "usage: byteoffset [1 | 0]";
~~~~~~ ^
stubs.c:162:17: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = "usage: senseflag [1 | 0]";
~~~~~~ ^
stubs.c:178:17: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = "usage: contextualhelp partofspeechnum searchtypenum";
~~~~~~ ^
stubs.c:183:14: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = helptext[pos][searchtype];
~~~~~~ ^
stubs.c:193:17: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = "usage: reopendb";
~~~~~~ ^
stubs.c:207:17: error: no member named 'result' in 'struct Tcl_Interp'
interp -> result = "usage: abortsearch";
~~~~~~ ^
14 errors generated.
make[2]: *** [wishwn-stubs.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Please advice me how to solve this problem. If the problem with Tcl/TK, could you please explain the right way to install it. Thanks
Direct access to interp->result! Oh, that's very deprecated nowadays.
Workaround
Your best bet is to build with Tcl 8.5 or 8.4 (where it's just NOT RECOMMENDED to use such coding patterns), but you can make things work in 8.6 by passing the -DUSE_INTERP_RESULT flag to the compiler. You will get warnings if you do this, but that's better than hard errors, yes?
Fixing it properly
Each of those places really ought to be changed to use Tcl_SetResult, i.e. from:
interp->result = "usage: glosses [1 | 0]";
to
Tcl_SetResult(interp, "usage: glosses [1 | 0]", TCL_DYNAMIC);
(OK, the TCL_DYNAMIC could be TCL_STATIC in this case, but we might as well code defensively; the overhead is effectively zero.)
Note that the Tcl_SetResult API has been supported in Tcl for decades. Changing to use it will not prevent code from building with older versions.

GCC compilation yields "real.h:53: error: 'SIZEOF_LONG' undeclared here (not in a function)"

I'm trying to compile GCC 4.7.2 on a Buffalo LinkStation Pro Duo (after unlocking it) which runs Linux 2.6.31.8 armv5tel.
Unfortunately, make throws quite some errors, starting with
gcc -c -DIN_GCC_FRONTEND -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-formIn file included from ../../gcc-4.7.2/gcc/tree.h:32,
from ../../gcc-4.7.2/gcc/c-lang.c:27:
../../gcc-4.7.2/gcc/real.h:53: error: 'SIZEOF_LONG' undeclared here (not in a function)
In file included from ../../gcc-4.7.2/gcc/tree.h:32,
from ../../gcc-4.7.2/gcc/c-lang.c:27:
../../gcc-4.7.2/gcc/real.h:87:5: error: division by zero in #if
../../gcc-4.7.2/gcc/real.h:87:5: error: division by zero in #if
../../gcc-4.7.2/gcc/real.h:90:6: error: division by zero in #if
Line 53 of real.h reads unsigned long sig[SIGSZ];, where SIGSZ is defined at line 40 as
#define SIGSZ (SIGNIFICAND_BITS / HOST_BITS_PER_LONG)
while line 87 is #if REAL_WIDTH == 1 with REAL_WIDTH defined starting at line 72 as
#define REAL_WIDTH \
(REAL_VALUE_TYPE_SIZE/HOST_BITS_PER_WIDE_INT \
+ (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */
This seems to boil down to the HOST_BITS_PER_* being zero. Do I have to define these manually with some configure parameter or how can this issue be resolved?
update
config.log contains the following errors:
conftest.c:10:19: error: ppl_c.h: No such file or directory
conftest.c: In function 'main':
conftest.c:16: error: 'choke' undeclared (first use in this function)
conftest.c:16: error: (Each undeclared identifier is reported only once
conftest.c:16: error: for each function it appears in.)
conftest.c:16: error: expected ';' before 'me'
configure:5708: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h. */
| #include "ppl_c.h"
| int
| main ()
| {
|.
| #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 11
| choke me
| #endif
|.
| ;
| r
Following this post I seem to have forgotten to install ppl, which I'll try now
SIZEOF_LONG should be #defined by configure in the file auto-host.h. Your auto-host.h should contain something like:
/* The size of `long', as computed by sizeof. */
#ifndef USED_FOR_TARGET
#define SIZEOF_LONG 8
#endif
If the above is not present (and it looks like in your case it's indeed so), check config.log for errors. Search for errors around the string checking size of long.
Thanks to chill's answer I checked config.log to discover
conftest.c:10:19: error: ppl_c.h: No such file or directory
(which, curiously, did not prevent configure from creating a Makefile and returning a success error code). The first google hit on that was this post, showing I didn't provide the ppl dependency.
The ppl-1.0 compilation greeted me with
checked_float.inlines.hh:1012: error: 'frexpl' was not declared in this scope
which led me to this post suggesting I'd use the 1.1 snapshot instead, which worked
Now, gcc's make offered me another "helpful" error:
gcc/../libcpp/include/line-map.h:66: error: 'CHAR_BIT'
which turned out to be due to C_INCLUDE_PATH ending with a colon (I already experienced the checking LIBRARY_PATH variable... contains current directory error mentioned in that post, but didn't think about checking other variables for that as well)
Compilation is still running, so far no more errors...

Resources