Missing boost files from an unknown path - openfoam

I receive errors on missing boost files but to my knowledge I already have them installed by YAST (OpenSUSE). However, I still receive the error. I need help fixing this problem.
When installation from YAST package did not work, I installed boost from source code. It still did not work. I installed boost-1.70.0
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_date_time
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_filesystem
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_system
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_regex
collect2: error: ld returned 1 exit status
make: *** [/home/hafiz/OpenFOAM/OpenFOAM-6/wmake/makefiles/general:142: /home/hafiz/OpenFOAM/hafiz-6/platforms/linux64GccDPInt64Opt/bin/laminarBuoyantSimpleSMOKE] Error 1
I would expect by installation of boost by source code, this error would get resolved but yet it's still there. boost compilation was successful as mentioned here:
...updated 184 targets...
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
/home/hafiz/Softwares/boost/boost_1_70_0
The following directory should be added to linker library paths:
/home/hafiz/Softwares/boost/boost_1_70_0/stage/lib
I'm not sure if compiler include paths and linker library paths are automatically added though. Please help resolve this issue! Thanks

It seems like you're using OpenFOAM and OpenSMOKE++ so you've left out a lot of important information to actually answer this question (e.g. OpenFOAM uses wmake and not make explicitly!). Despite this, I'm going to answer assuming you (1) have OpenFOAM installed already, (2) are compiling OpenSMOKE++ applications/solvers, and (3) your only problem is that wmake can't find boost that you've installed.
You need to add the boost paths to your (solver)/Make/files EXE_LIBS section for wmake to find boost:
EXE_LIBS = \
-L$(FOAM_USER_LIBBIN) \
-lfiniteVolume \
-lmeshTools \
-lsampling \
-lfvOptions \
-L$(BOOST_LIB_DIR)
Where BOOST_LIB_DIR is an environmental variable set to /home/hafiz/Softwares/boost/boost_1_70_0/stage/lib
For more information, see the OpenFOAM User Guide Section 3.2: Compiling Applications and Libraries https://cfd.direct/openfoam/user-guide/v6-compiling-applications/#x10-710003.2
Also, stackoverflow isn't the best place for OpenFOAM -- cfd-online.com has a CFD/OpenFOAM specific forum better suited to questions like this.

Related

homebrew not installing JAGS

I'm trying to install JAGS through homebrew so I can use it in R. I am getting the following warning every time I install:
Warning: jags dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.
Then, when I try to install rjags in R, I get the following error:
configure: error: "cannot link to JAGS library in /usr/local/Cellar/jags/4.3.0_2/lib."
ERROR: configuration failed for package ‘rjags’
* removing ‘/usr/local/lib/R/4.0/site-library/rjags’
I also tried following the installation guide in the JAGS 4.3.0 readme. This yielded the same error once I moved to R.
Googling leads me to the following links, none of which seem closely related enough to help me:
https://github.com/Homebrew/brew/issues/4904
https://github.com/Homebrew/homebrew-core/issues/32112
Link different C++ standard libraries on Mac OS X
Here also is the entire result of my brew doctor
(base) aridf#Aris-MacBook-Pro ~ % brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/Users/aridf/opt/anaconda3/bin/icu-config
/Users/aridf/opt/anaconda3/bin/krb5-config
/Users/aridf/opt/anaconda3/bin/freetype-config
/Users/aridf/opt/anaconda3/bin/xslt-config
/Users/aridf/opt/anaconda3/bin/libpng16-config
/Users/aridf/opt/anaconda3/bin/libpng-config
/Users/aridf/opt/anaconda3/bin/xml2-config
/Users/aridf/opt/anaconda3/bin/python3-config
/Users/aridf/opt/anaconda3/bin/curl-config
/Users/aridf/opt/anaconda3/bin/ncursesw6-config
/Users/aridf/opt/anaconda3/bin/pcre-config
/Users/aridf/opt/anaconda3/bin/python3.8-config
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libtcl8.6.dylib
/usr/local/lib/libtk8.6.dylib
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/fakemysql.h
/usr/local/include/fakepq.h
/usr/local/include/fakesql.h
/usr/local/include/itcl.h
/usr/local/include/itcl2TclOO.h
/usr/local/include/itclDecls.h
/usr/local/include/itclInt.h
/usr/local/include/itclIntDecls.h
/usr/local/include/itclMigrate2TclCore.h
/usr/local/include/itclTclIntStubsFcn.h
/usr/local/include/mysqlStubs.h
/usr/local/include/odbcStubs.h
/usr/local/include/pqStubs.h
/usr/local/include/tcl.h
/usr/local/include/tclDecls.h
/usr/local/include/tclOO.h
/usr/local/include/tclOODecls.h
/usr/local/include/tclPlatDecls.h
/usr/local/include/tclThread.h
/usr/local/include/tclTomMath.h
/usr/local/include/tclTomMathDecls.h
/usr/local/include/tdbc.h
/usr/local/include/tdbcDecls.h
/usr/local/include/tdbcInt.h
/usr/local/include/tk.h
/usr/local/include/tkDecls.h
/usr/local/include/tkPlatDecls.h
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/tcl.pc
/usr/local/lib/pkgconfig/tk.pc
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected static libraries:
/usr/local/lib/libtclstub8.6.a
/usr/local/lib/libtkstub8.6.a
Thanks!
The solution, per https://gist.github.com/casallas/8411082, was to change ~/.R/Makedir to the following:
CC=clang
CXX=clang++
Then reinstall the package in R

Unable to compile AdaControl: unknown project file: "asis"

I downloaded the source for AdaControl from the SourceForge Repo. Using GNAT 2017 CE, I get the following error on make:
$ make build
gprbuild build.gpr adactl -cargs -bargs -largs
build.gpr:1:06: unknown project file: "asis"
gprbuild: "build.gpr" processing failed
make: *** [adactl] Error 4
The instructions make it sound like this is all I need to do, and offer no troubleshooting suggestions:
Go to the root directory of the distribution and type:
make build make install
As this related question notes, I have managed to get ASIS to build, though it also comes packaged with GNAT 2017 CE.
That message means that ASIS4GNAT isn't installed in a place where gprbuild (and the rest of your GCC/Ada tool-chain) can find it.
You can use the command gnatls -v to get an idea about where your GCC/Ada tool-chain expects project files to be located.
Compare that to where you actually installed ASIS4GNAT, and you may be closer to a solution.

Compiling and Linking against plplot library on debian

I am using Code::Blocks IDE on Debian 8. I have installed the plplot library form synaptic (not from source). When I create new project in C::B and try to run a simple plplot example the compiler do not recognize the includes and the linker do not recognize the plplot library. So how to compile and link with plplot library when I have installed it from Synaptic not from source? Is this possible, or I should remove current packages and install from source only?
In general when I install new library (from synaptic or from source) how to find out what should be the compiler flags and search directories and for the linker too? I think installing from source should be the less problems prone way!
Till now I am doing file search for the included header and add its directory to the search path for the compiler. But this is very cumbersome and naive approach. It will be better if I add compiler flag that does all this job, but how to find it out. Some flags I find in forums but not in the documentation of the libraries. Why there is no file with the third program library to tell what flags should one use? Nevertheless when the o files are done I have linker errors like "undefined reference to...".
For the plplot library the linker flag should be -lplplotd. For the compiler options I have no flags but I did a search for the unknown headers and added their directories to the search directories path. Now the Example 00 works fine. Though I found the -lplplotd flag by shooting! For the x11 examples one should add the flag -lplplotcxxd.
In general I got that to find the linker flag I have to search for the library so file and the name of the file commonly is the flag, e.g. for the library libplplotcxxd.so the flag is -lplplotcxxd.
Anyway, I'd be glad if someone tells me a better clue on finding these linker flags.

Ada GPS IDE Compiler error Undefined symbols for architecture x86_64

Trying to get GtkAda to work. Didn't compile the lib myself, had a lot of problems and finally I found a precompiled library on the internet. Of course GPS didn't find it even after adding it to my path...
So I added it manually to my project and GPS began the compilation. It is just a simple example to see if everything works. Just beginning to learn programming.
WITH Gtk.Main ;
USE Gtk.Main ;
WITH Gtk.Window ;
USE Gtk.Window ;
WITH Gtk.Enums ;
USE Gtk.Enums ;
PROCEDURE MaFenetre IS
win : Gtk_window ;
BEGIN
Init ;
Gtk_New(win,Window_Popup) ;
win.show ;
Main ;
END MaFenetre ;
Which gave me this error:
gnatlink /Users/laurentlutgen/GPS/mafenetre.ali -o
/Users/laurentlutgen/GPS/mafenetre
Undefined symbols for architecture x86_64:
"_ada_c_enum_value_size", referenced from:
.
.
.
"_pango_tab_array_new", referenced from:
pango_tabs__pango_new in pango-tabs.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit
status gnatlink: error when calling /usr/local/gnat/bin/gcc
gnatmake: * link failed.
[2013-08-01 21:16:46] process exited with
status 4 (elapsed time: 09.38s)
The list of files the compiler complains about is quite long so.
Anyone an idea how to solve this.
I use the last version of gnat (2013) from AdaCore for MacOS X. I use MacOS 10.8.
The GtkAda library is xadalib 2012.
Thanks
Laurent
From what I see, gnatlink does not get passed the libraries needed to link against. You said that you added GtkAda to your project manually. By doing this, you probably missed all the linker options specified in the *.gpr file of GtkAda, so your binary does not get linked against the GTK+ library.
I suggest you try to get GPS to find the installed GtkAda project file. You can do this by setting ADA_PROJECT_PATH before launching GPS. If GtkAda is located in GNAT GPL's default path, it looks like this:
$ export ADA_PROJECT_PATH="/usr/local/gnat/lib/gnat"
$ gps
You said you're using a precompiled binary you found on the internet. Are you aware that GtkAda is bundled with the GNAT GPL compiler? You should use that, unless you want to use gtk-quartz as backend (which doesn't require X11). If that's the case, you may find the instructions I wrote for compiling GPS with gtk-quartz helpful (as Simon already noted).
If you want, you can try my GPS port to OSX. By default, it is able to load the *.gpr files bundled with GNAT GPL. On the Usage page, you find instructions of how to change the ADA_PROJECT_PATH if you installed your GNAT somewhere else.
For further help, you should post the *.gpr file of your project.
Edit:
I stand corrected: GtkAda is in fact not included in the GNAT GPL distribution for whatever reason. As XmlAda is included as project to link against, I was sure GtkAda was too, but it isn't; so using XAdaLib seems to be the easiest option. You have to point ADA_PROJECT_PATH to the installation directory of XAdaLib instead of the usual GNAT one to be able to use GtkAda.
As far as I know none of the GPL'ed GNATs from AdaCore for x86 have the capability to generate 64-bit code. I think I read something to that effect somewhere but cannot remember where.
The issue also came up in the Ada-port of Doom3, so if you can find him he might know for sure.

Solaris make error - ld: fatal: library -luutil: not found

Hi guys hoping some of you solaris wizards might be able to point me in the right direction...
Background:
I'm compiling a program that makes use of some of the zfs CLI code. (found here: https://github.com/illumos/illumos-gate/tree/master/usr/src/cmd/zfs)
Problem:
libuutil.so.1 is present in /usr/lib but if I try to compile like so...
$ gcc -lzfs -L/usr/lib -luutil -lnvpair
ld: fatal: library -luutil: not found
Can anyone suggest a fix? Or a reason that the lib is not being found?
Thanks guys!
You need to link to a libuutil.so library. As explained in a post pointed to by Ben van Gompel and in this post:
https://blogs.oracle.com/mandalika/entry/quick_fix_to_the_linker
You'd need to do:
ln -s /usr/lib/libuutil.so.1 /usr/lib/libuutil.so
This is because ld looks only for names that end in .so, not in number. This is a simple mechanism to have many versions of one library (version being designated by the number at the end) that can be used by compilation process.

Resources