Trying to install the mongodb extension (MacOS Big Sur) - mongodb

When writing this command line
sudo C_INCLUDE_PATH=/usr/local/opt/openssl/include /Applications/XAMPP/xamppfiles/bin/pecl install mongodb
I get this error.
fatal error: 'unicode/usprep.h' file not found
#include <unicode/usprep.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [src/libmongoc/src/libmongoc/src/mongoc/mongoc-scram.lo] Error 1
ERROR: `make' failed
It says something with the usprep.h, it took for me days to figure out in many different ways but unfortunately you guys may support me to solve it.

Related

Simulink: fatal error: MQTTAsync.h: No such file or directory

I am trying to build an MQTT system on a raspberry pi. I was studying about MQTT and read about it a lot. I found a set of MQTT blocks in the Simulink Raspberry Pi Hardware Support Package that I assumed I could directly use. I configured an MQTT server and got all the right credentials and everything but I am now stuck on one part that has left me stumped.
I keep getting this error saying that "fatal error: MQTTAsync.h: No such file or directory". I have looked a lot trying to find anything that might help me but I couldn't. I don't know where to get the necessary files that I need or if there is any solution to sort this. I'm sharing the entire snippet of the error if that is of any help. Thanks in advance.
I apologize I'm not able to get to the whole error into a code block
Error executing command "touch -c /home/pi/MATLAB_ws/R2022a/C/Users/User/Documents/MATLAB/Project_RPi_ert_rtw/*.*;make -f Project_RPi.mk all MATLAB_WORKSPACE="/home/pi/MATLAB_ws/R2022a" -C /home/pi/MATLAB_ws/R2022a/C/Users/User/Documents/MATLAB/Project_RPi_ert_rtw LC_ALL=C". Details:
STDERR: In file included from /home/pi/MATLAB_ws/R2022a/C/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/realtime/targets/linux/src/MW_MQTT.c:5:
/home/pi/MATLAB_ws/R2022a/C/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/realtime/targets/linux/include/MW_MQTT.h:49:10: fatal error: MQTTAsync.h: No such file or directory
#include <MQTTAsync.h>
^~~~~~~~~~~~~
compilation terminated.
make: *** [Project_RPi.mk:411: MW_MQTT.c.o] Error 1
STDOUT: make: Entering directory '/home/pi/MATLAB_ws/R2022a/C/Users/User/Documents/MATLAB/Project_RPi_ert_rtw'
gcc -c -MMD -MP -MF"MW_MQTT.c.dep" -MT"MW_MQTT.c.o" -O2 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DMW_CAN_BITRATE=500000 -DMW_CAN_ALLOWALLMSGS=1 -DMW_NUM_MQTT_SUBSCRIBE=1 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=64 -DRT -DMODEL=Project_RPi -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -I/home/pi/MATLAB_ws/R2022a/C/Users/User/Documents/MATLAB -I/home/pi/MATLAB_ws/R2022a/C/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/realtime/targets/linux/include -I/home/pi/MATLAB_ws/R2022a/C/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/target/shared/svd/include -I/home/pi/MATLAB_ws/R2022a/C/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/realtime/targets/raspi/include -I/home/pi/MATLAB_ws/R2022a/C/Users/User/Documents/MATLAB/Project_RPi_ert_rtw -I/home/pi/MATLAB_ws/R2022a/C/Program_Files/MATLAB/R2022a/extern/include -I/home/pi/MATLAB_ws/R2022a/C/Program_Files/MATLAB/R2022a/simulink/include -I/home/pi/MATLAB_ws/R2022a/C/Program_Files/MATLAB/R2022a/rtw/c/src -I/home/pi/MATLAB_ws/R2022a/C/Program_Files/MATLAB/R2022a/rtw/c/src/ext_mode/common -I/home/pi/MATLAB_ws/R2022a/C/Program_Files/MATLAB/R2022a/rtw/c/ert -I/home/pi/MATLAB_ws/R2022a/C/Program_Files/MATLAB/R2022a/toolbox/coder/rtiostream/src/utils -I/home/pi/MATLAB_ws/R2022a/C/Program_Files/MATLAB/R2022a/toolbox/target/codertarget/rtos/inc -o "MW_MQTT.c.o" "/home/pi/MATLAB_ws/R2022a/C/ProgramData/MATLAB/SupportPackages/R2022a/toolbox/realtime/targets/linux/src/MW_MQTT.c"
make: Leaving directory '/home/pi/MATLAB_ws/R2022a/C/Users/User/Documents/MATLAB/Project_RPi_ert_rtw'

Trying to build nominatim 3.4.1 I get "fatal error: postgres.h: No such file or directory"

I'm trying to install Nominatim 3.4.1 on Ubuntu 20.04 and PostgreSQL 12, so I'm following the official instructions from here, the issue is when I execute make, I have this error:
[ 79%] Built target osm2pgsql_lib
[ 79%] Built target osm2pgsql
[ 79%] Running external makefile /usr/lib/postgresql/12/lib/pgxs/src/makefiles/pgxs.mk
/srv/nominatim/Nominatim-3.4.0/module/Makefile:11: warning: overriding recipe for target &apos;install&apos;
/usr/lib/postgresql/12/lib/pgxs/src/makefiles/pgxs.mk:241: warning: ignoring old recipe for target &apos;install&apos;
/srv/nominatim/Nominatim-3.4.0/module/nominatim.c:1:10: fatal error: postgres.h: No such file or directory
1 | #include "postgres.h"
| ^~~~~~~~~~~~
compilation terminated.
make[3]: *** [<builtin>: nominatim.o] Error 1
make[2]: *** [module/CMakeFiles/nominatim_lib.dir/build.make:61: /srv/nominatim/Nominatim-3.4.0/module/dummy] Error 2
make[1]: *** [CMakeFiles/Makefile2:1908: module/CMakeFiles/nominatim_lib.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
first lines of nominatim.c file:
#include "postgres.h"
#include "fmgr.h"
I've tried find / -name "postgres.h" and find / -name "fmgr.h" and there is no such files.
I'm almost sure that the problem is that PostgreSQL 12 removed this files, changed the names or something similar, and Nominatim 3.1.4 are not aware of that change. I'd like not to downgrade PostgreSQL to solve this unless that is the only possible solution, also I don't know if a downgrade solve the issue.
on my case this got solved by reinstalling postgres sudo apt install postgresql-server-dev-12 postgresql-12-postgis-3 \ postgresql-contrib-12 postgresql-12-postgis-3-scripts

Error with using ORB-SLAM2

I was trying to get my hands dirty with SLAM and I started with ORB-SLAM2 library.
I have downloaded a TUM sequence and wanted to use ROS for it. So I am following the steps according this page.
In Step 7, part 2, when i run ./build_ros.sh, I get the following error:
In file included from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41:0,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../include/LoopClosing.h:34,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../include/LocalMapping.h:26,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../include/Tracking.h:31,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../include/System.h:29,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/src/AR/ViewerAR.h:29,
from /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/src/AR/ViewerAR.cc:21:
/home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/../../../Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:36:24: fatal error: g2o/config.h: No such file or directory
compilation terminated.
CMakeFiles/MonoAR.dir/build.make:198: recipe for target 'CMakeFiles/MonoAR.dir/src/AR/ViewerAR.cc.o' failed
make[2]: *** [CMakeFiles/MonoAR.dir/src/AR/ViewerAR.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
I went and checked the g2o folder and there is a file by name config.h.
So why am I still getting the error?
In the CMakeLists.txt in /home/sarvagya/Desktop/Swaayatt/ORB_SLAM2/Examples/ROS/ORB_SLAM2/
Try adding
${PROJECT_SOURCE_DIR}/../../../Thirdparty
to the list of include_directories() at line 44 (it should be at that line if you did not change the file)
Adding this line tells the cmake where to find the g2o/config.h.
From the information, that missing g2o/config.h in jacobian_workspace.h, but when I look into the file, and do not find the include in line 36. Do I miss something, or you change something?

Install CLAPACK-3.2.1 in fedora 23

Hi I use fedora23 to calculate matrix.
So I am trying to install CLAPACK-3.2.1 to my computer.
In the procedure,
1. download clapack.tgz (version 3.2.1) from www.netlib.org/clapack -> done
2. cd CLAPACK-3.2.1 and cp make.inc.example make.inc -> done
3. make f2clib -> done properly
4. make blaslib -> done properly
5. make (this takes a while) -> problem starts here.
in a procedure of make, there are two errors. The error message is this.
make[2]: Leaving directory '/home/optics/CLAPACK/TESTING/EIG'
NEP: Testing Nonsymmetric Eigenvalue Problem routines
./xeigtstz < nep.in > znep.out 2>&1
/bin/sh: line 1: 9412 Segmentation fault (core dumped) ./xeigtstz < nep.in > znep.out 2>&1
Makefile:438: recipe for target 'znep.out' failed
make[1]: *** [znep.out] Error 139
make[1]: Leaving directory '/home/optics/CLAPACK/TESTING'
Makefile:44: recipe for target 'lapack_testing' failed
make: *** [lapack_testing] Error 2
==============================================================================
I cannot understand this. Please help me dealing with these errors.
I have also encountered this problem and was able to resolve it by increasing the stack size using ulimit as suggested here. The following worked for me:
$ sudo ulimit -s 100000
Followed by running make as usual. If you would like a primer on what this command does, check out this question: What does “ulimit -s unlimited” do?. Basically, it increases the limits on the scratch space in memory allocated to a thread.
In Kubuntu 17.10 it worked in this way:
ulimit -s unlimited

Postgresql9.5alpha1 installation error

I tried to install postgresql 9.5(alpha) Ubuntu, but after make world I got this error:
In file included from ../../../../src/include/postgres.h:47:0,
from varlena.c:15:
levenshtein.c: In function ‘varstr_levenshtein’:
../../../../src/include/c.h:726:7: error: static assertion failed: "Levenshtein hinting mechanism restricts NAMEDATALEN"
do { _Static_assert(condition, errmessage); } while(0)
levenshtein.c:104:2: note: in expansion of macro ‘StaticAssertStmt’
StaticAssertStmt(NAMEDATALEN <= MAX_LEVENSHTEIN_STRLEN,
levenshtein.c: In function ‘varstr_levenshtein_less_equal’:
../../../../src/include/c.h:726:7: error: static assertion failed: "Levenshtein hinting mechanism restricts NAMEDATALEN"
do { _Static_assert(condition, errmessage); } while(0)
levenshtein.c:104:2: note: in expansion of macro ‘StaticAssertStmt’
StaticAssertStmt(NAMEDATALEN <= MAX_LEVENSHTEIN_STRLEN,
make[4]: *** [varlena.o] Error 1
make[3]: *** [adt-recursive] Error 2
make[2]: *** [utils-recursive] Error 2
make[1]: *** [all-backend-recurse] Error 2
make: *** [world-src-recurse] Error 2
Does anybody have a suggestion?
In ubuntu you can install latest on this moment postgresql 9.5alpha2 from my ppa by this series of command from terminal:
sudo apt-add repository ppa:kazan417/postgresql
sudo apt-get update
sudo apt-get install postgresql-9.5 postgresql-contrib-9.5 postgresql-client-9.5
This commands not just install postgresql also it setup evrything you need for running postgresql.
Also you can install additional packages. or if you want harder way compile it from source by "dpkg-buildpackage" - this is better ubuntu way of compiling. And then installing by dpkg -i .
Here link you can find more info like dsc file and orig.tar.gz for compiling.