Compilation Error: libDAI-0.3.2 in Ubuntu 14.04 with MATLAB - matlab

I am trying to install libDAI-0.3.2 in Ubuntu 14.04. I need to use it with MATLAB.
I made following changes :
In Makefile.conf:
CC=g++-4.7
MEXFLAGS:=CXX=#$(CC) CXXFLAGS#'$(CCFLAGS)'
In Makefile.ALL: WITH_MATLAB=true
Since default compiler in Ubuntu 14.04 is gcc 4.8.4, I installed gcc-4.7 and g++4.7.
Still I get the following compilation error:
libDAI-0.3.2$ make
/usr/local/MATLAB/R2015a/bin/mex -Iinclude CXX= -largeArrayDims -lgmpxx -lgmp -output matlab/dai.mexa64 src/matlab/dai.cpp src/matlab/matlab.cpp src/graph.cpp src/dag.cpp src/bipgraph.cpp src/varset.cpp src/daialg.cpp src/alldai.cpp src/clustergraph.cpp src/factor.cpp src/factorgraph.cpp src/properties.cpp src/regiongraph.cpp src/cobwebgraph.cpp src/util.cpp src/weightedgraph.cpp src/exceptions.cpp src/exactinf.cpp src/evidence.cpp src/emalg.cpp src/io.cpp src/bp.cpp src/fbp.cpp src/trwbp.cpp src/mf.cpp src/hak.cpp src/lc.cpp src/treeep.cpp src/jtree.cpp src/mr.cpp src/gibbs.cpp src/bbp.cpp src/cbp.cpp src/bp_dual.cpp src/decmap.cpp src/glc.cpp
Building with 'g++'.
/tmp/mex_11282758003780_5023: -c: not found
make: *** [matlab/dai.mexa64] Error 255
what does this mean? Any idea how to fix this?
Thanks & Regards,
Swagatika

Try replacing
MEXFLAGS:=CXX=#$(CC) CXXFLAGS#'$(CCFLAGS)'
with
MEXFLAGS:=CXX=$(CC) CXXFLAGS='$(CCFLAGS)'

MEXFLAGS:=CXX=$(CC) CXXFLAGS='$(CCFLAGS)' replace this

Related

Booting xv6 with qemu

I am trying to boot xv6 with qemu but whenever I run make qemu , I am getting the following error
usertests.c: In function ‘sbrktest’:
usertests.c:1461:13: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
1461 | *lastaddr = 99;
| ~~~~~~~~~~^~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: usertests.o] Error 1
Running make qemu-nox resulted in same error.I am using Kubuntu 21.10 operating system.here is a way around but I am looking for a solution if anyone finds out.
Maybe it would help:
Delete "_usertests" & "usertests.c" from makefile and try make clean - > make -> make qemu
I fix this problem just now, don't use the higher version ubuntu. I make qemu-nox success in 18.04 ubuntu operation system.

mutt installaiton error on CentOS 6.7

I'm trying to install mutt on CentOS 6.7 and ./configure --prefix=$HOME/local runs fine but at make install step, I run into this error below that I don't know how to solve. I tried with mutt 1.6.1 and 1.6.0 and this same error came up so it's probably some system setting that wasn't correct. How could I fix it?
gcc -std=gnu99 -Wall -pedantic -Wno-long-long -g -O2 -o mutt addrbook.o alias.o attach.o base64.o browser.o buffy.o color.o crypt.o cryptglue.o commands.o complete.o compose.o copy.o curs_lib.o curs_main.o date.o edit.o enter.o flags.o init.o filter.o from.o getdomain.o group.o handler.o hash.o hdrline.o headers.o help.o hook.o keymap.o main.o mbox.o menu.o mh.o mx.o pager.o parse.o pattern.o postpone.o query.o recvattach.o recvcmd.o rfc822.o rfc1524.o rfc2047.o rfc2231.o rfc3676.o score.o send.o sendlib.o signal.o sort.o status.o system.o thread.o charset.o history.o lib.o muttlib.o editmsg.o mbyte.o mutt_idna.o url.o ascii.o crypt-mod.o safe_asprintf.o patchlist.o conststrings.o pgp.o pgpinvoke.o pgpkey.o pgplib.o gnupgparse.o pgpmicalg.o pgppacket.o crypt-mod-pgp-classic.o smime.o crypt-mod-smime-classic.o resize.o -lncursesw -lidn
/opt/gnu/bin/ld: curs_lib.o: undefined reference to symbol 'wtimeout'
/lib64/libtinfo.so.5: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [mutt] Error 1
OK, I somehow fixed it.. not really understand why this fixed it.
After configure, in the Makefile, change the LDFLAGS = line to LDFLAGS = -lncurses -ltinfo, then make install and it solved the issue.
Credit to this post: http://www.pclinuxos.com/forum/index.php?topic=129566.0, Tara-Rain-9.5ß's answer

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.

Why can't MATLAB deploytool output exe file?

deploytool works well until creating exe file using mbuild then get this error:
Executing command: mbuild -O -v -output "U1" -I"e:\Mat2009\work\ntst1\U1\src" "e:\Mat2009\work\ntst1\U1\src\U1_main.c" "e:\Mat2009\work\ntst1\U1\src\U1_delay_load.c" "e:\Mat2009\work\ntst1\U1\src\U1_mcc_component_data.c" -link exe -env MCR_DELAYLOAD=/delayload:mclmcrrt710.dll -env
MCR_DELAYLIB=delayimp.lib -outdir "e:\Mat2009\work\ntst1\U1\src"
Error: An error occurred while shelling out to mbuild (error code = -1).
Unable to build executable.
??? Error using ==> mcc
Error executing mcc, return status = 1 (0x1).
How can I resolve this error?
This error looks similar to an error I encountered once (after upgrading to 2012b), I cannot recall the source but I found two potential solutions:
Make sure there are no spaces in the path to the compiler
Try building a few times and cross your fingers
Given the time frame I had I chose to go for option two and after 5-10 attempts it suprisingly worked.
have found that COMSPEC env. var had a wrong value, so I deleted the wrong path, restarted MATLAB then it worked well.

Error in ./configure in solaris 11

Okay i am trying to install BIND on solaris 11.
Upon downloading the tar file using wget, then i used extract it out.
After which, when i enter the command :
./configure
i face the following error
checking <<some stuff>>
..
..
..
checking <<some stuff>>
checking whether we are cross compiling... configure: error: in '/home/user/user/downloads/bind9.8.2
configure: error: cannot run C compiled programs.
If you meant to cross compile, use '--host'.
so i used --host in my option, but i cant get it to work,
For example, i entered the below command :
./configure --host=ulinux-uclibc
I received an error saying
checking host system type... Invalid configuration 'ulinux-uclibc': machine 'ulinux' not recognized
Thanks! :)
Why not just install the bind package from your configured solaris publisher?
# pkg install network/dns/bind service/network/dns/bind
should get you exactly what you need. That will get you ISC Bind v9.6.3 if you use pkg.oracle.com/solaris/release publisher.