Unable to find Foundation Header Files on Ubuntu - objective-c

I have a Ubuntu server with Slicehost (now RackSpace) and am trying to get GNUstep installed so that I can compile Objective-c code.
After installing the world via apt-get and going through numerious blogs to try and get my source compiled, it now seems clear to me that I don't have the Foundation.h header files installed and I have no idea where to get these from.
They are present on my Mac, maybe I could simply copied them over to Ubuntu and it'll all be gravy - wishful thinking?
Any help on how to locate and install the Foundation.h files is appreciated.
In response to Andy's question
~: dpkg -l | grep -i gnustep
ii gnustep-back-common 0.12.0-1 The GNUstep GUI Backend - common files
ii gnustep-back0.12 0.12.0-1 The GNUstep GUI Backend
ii gnustep-back0.12-art 0.12.0-1 The GNUstep GUI Backend
ii gnustep-base-common 1.14.1-2ubuntu1 GNUstep Base library - common files
ii gnustep-base-runtime 1.14.1-2ubuntu1 GNUstep Base library
ii gnustep-common 2.0.2-1 Common files for the core GNUstep environmen
ii gnustep-core 6 The GNUstep Development Environment -- core
ii gnustep-devel 6 The GNUstep Development Environment -- devel
ii gnustep-gpbs 0.12.0-1 The GNUstep PasteBoard Server
ii gnustep-gui-common 0.12.0-3ubuntu1 GNUstep GUI Library - common files
ii gnustep-gui-runtime 0.12.0-3ubuntu1 GNUstep GUI Library - runtime files
ii gnustep-make 2.0.2-1 Basic GNUstep Makefiles
ii gorm.app 1.2.2-1 Visual Interface Builder for GNUstep
ii libgnustep-base1.14 1.14.1-2ubuntu1 GNUstep Base library
ii libgnustep-gui0.12 0.12.0-3ubuntu1 GNUstep GUI Library
ii projectcenter.app 0.4.3-3ubuntu1 IDE for GNUstep Development
ii projectmanager.app 0.2-3 Simple IDE for GNUstep
Answer to 2nd question.
~: sudo apt-get install libgnustep-base-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
libgnustep-base-dev: Depends: libxslt1-dev but it is not going to be installed
E: Broken packages

Which version of Ubuntu server are you running?
I'm running Ubuntu server 10.04 LTS and found my Foundation.h under /usr/include/GNUstep/Foundation/Foundation.h, it belongs to the package libgnustep-base-dev. Might be different in other versions...
Maybe you could post your output of dpkg -l | grep -i gnustep to compare our lists.
root#scm ~ # cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS"
root#scm ~ # locate Foundation.h
/usr/include/GNUstep/Foundation/Foundation.h
root#scm ~ # ls -l /usr/include/GNUstep/Foundation/Foundation.h
-rw-r--r-- 1 root root 4991 2009-08-31 23:45 /usr/include/GNUstep/Foundation/Foundation.h
root#scm ~ # dpkg -S /usr/include/GNUstep/Foundation/Foundation.h
libgnustep-base-dev: /usr/include/GNUstep/Foundation/Foundation.h
root#scm ~ # dpkg -l | grep -i gnustep
ii gnustep-back-common 0.16.0-3 The GNUstep GUI Backend - common files
ii gnustep-back-doc 0.16.0-3 The GNUstep GUI Backend documentation
ii gnustep-back0.16 0.16.0-3 The GNUstep GUI Backend
ii gnustep-back0.16-art 0.16.0-3 The GNUstep GUI Backend
ii gnustep-base-common 1.19.3-1ubuntu1 GNUstep Base library - common files
ii gnustep-base-doc 1.19.3-1ubuntu1 Documentation for the GNUstep Base Library
ii gnustep-base-runtime 1.19.3-1ubuntu1 GNUstep Base library
ii gnustep-common 2.2.0-1 Common files for the core GNUstep environmen
ii gnustep-core-devel 7.4 The GNUstep Development Environment -- core
ii gnustep-core-doc 7.4 The GNUstep Development Environment -- core
ii gnustep-devel 7.4 The GNUstep Development Environment -- devel
ii gnustep-gpbs 0.16.0-3 The GNUstep PasteBoard Server
ii gnustep-gui-common 0.16.0-2build1 GNUstep GUI Library - common files
ii gnustep-gui-doc 0.16.0-2build1 Documentation for the GNUstep GUI Library
ii gnustep-gui-runtime 0.16.0-2build1 GNUstep GUI Library - runtime files
ii gnustep-make 2.2.0-1 Basic GNUstep Makefiles
ii gnustep-make-doc 2.2.0-1 Documentation for GNUstep-make
ii gorm.app 1.2.8-1ubuntu0.1 Visual Interface Builder for GNUstep
ii libgnustep-base-dev 1.19.3-1ubuntu1 GNUstep Base header files and development li
ii libgnustep-base1.19 1.19.3-1ubuntu1 GNUstep Base library
ii libgnustep-gui-dev 0.16.0-2build1 GNUstep GUI header files and static librarie
ii libgnustep-gui0.16 0.16.0-2build1 GNUstep GUI Library
ii librenaissance0 0.9.0-2build2 GNUstep GUI Framework - library files
ii librenaissance0-dev 0.9.0-2build2 GNUstep GUI Framework - development file
ii projectcenter.app 0.5.0~20080704-1build1 IDE for GNUstep Development
root#scm ~ #

Related

Intel OneAPI 2022 - libimf.so No such file or directory - during openMPI compilation

trying to compile openmpi with intel oneapi 2022.0.1 compilers
OS is 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
I got the intel compilers as follows (just to make sure I didn't mess anything up at that step)
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt install intel-basekit
sudo apt install intel-hpckit
Configuring openmpi with:
./configure --prefix=${HPCX_HOME}/ompi-icc CC=/opt/intel/oneapi/compiler/2022.0.1/linux/bin/intel64/icc CXX=/opt/intel/oneapi/compiler/2022.0.1/linux/bin/intel64/icpc F77=/opt/intel/oneapi/compiler/2022.0.1/linux/bin/intel64/ifort FC=/opt/intel/oneapi/compiler/2022.0.1/linux/bin/intel64/ifort --with-ucx=/usr --with-platform=contrib/platform/mellanox/optimized
my .bashrc has (root has the same .bashrc)
source /opt/intel/oneapi/setvars.sh
export LD_LIBRARY_PATH=/opt/intel/oneapi/compiler/2022.0.1/linux/compiler/lib/intel64_lin
After configure I do : sudo make all install and get the following error:
ld: /opt/intel/oneapi/compiler/2022.0.1/linux/bin/intel64/../../bin/intel64/../../lib/icx-lto.so: error loading plugin: libimf.so: cannot open shared object file: No such file or directory
There is no ifortvars.sh with this new version of oneAPI which seems to have solved similar issues for others in the past.
libimf.so is in:
/opt/intel/oneapi/itac/2021.5.0/bin/rtlib/libimf.so
/opt/intel/oneapi/compiler/2022.0.1/linux/compiler/lib/intel64_lin/libimf.so
/opt/intel/oneapi/intelpython/python3.9/pkgs/intel-cmplr-lib-rt-2022.0.1-intel_3633/lib/libimf.so
/opt/intel/oneapi/intelpython/python3.9/lib/libimf.so
/opt/intel/oneapi/intelpython/python3.9/envs/2022.0.1/lib/libimf.so
Any help and/or advice regarding compiling openmpi with recent intel compilers would be appreciated.
Here is the solution I found but doubt that this is the most elegant way of doing this:
OS is 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
my .bashrc has (root has the same .bashrc)
source /opt/intel/oneapi/setvars.sh
created intel_libs.conf in
/etc/ld.so.conf.d/ and added the line /opt/intel/oneapi/compiler/2022.0.1/linux/compiler/lib/intel64_lin this is where the libimf.so lives.
sudo ldconfig
compiled openmpi with intel compilers fine after that using:
./configure --prefix={HPCX_HOME}/ompi-icc CC=/opt/intel/oneapi/compiler/2022.0.1/linux/bin/intel64/icc CXX=/opt/intel/oneapi/compiler/2022.0.1/linux/bin/intel64/icpc F77=/opt/intel/oneapi/compiler/2022.0.1/linux/bin/intel64/ifort FC=/opt/intel/oneapi/compiler/2022.0.1/linux/bin/intel64/ifort --with-ucx=/usr --with-platform=contrib/platform/mellanox/optimized
sudo make all
sudo make install
I hope this helps someone else and please let me know if there is a better way of doing this. Cheers
I am also facing similar issue not exactly. I installed the new ifort using the following command lines:
wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18236/l_BaseKit_p_2021.4.0.3422.sh
sudo bash l_BaseKit_p_2021.4.0.3422.sh
wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18211/l_HPCKit_p_2021.4.0.3347.sh
sudo bash l_HPCKit_p_2021.4.0.3347.sh
There is no file called setvars.sh inside the source /opt/intel/oneapi/, also while compiling any mpiifort file it is throwing me an error saying:
error loading plugin: libimf.so: cannot open shared object file: No such file or directory
Not even sure, if this is related to this thread or not, but any further guidance would be very helpful, thanks in advance.

Installing Rakudo on Android with ARM processor architecture

I am trying to install Rakudo on my Android with armv7l processor architecture using Termux.
I tried compiling from source, but it didn't work. Then someone pointed out the Termux user its-pointless and his package for this, but that package does not work on my phone.
How can I run Raku on my phone while it is offline? I'm open to solutions not using Termux.
Termux on SSH results:
u0_a74#localhost ~/rakudo [100]> pkg show rakudo -a
Package: rakudo Version: 2020.05 Maintainer: Termux members #termux
Installed-Size: 37.7 MB Depends: moarvm Homepage: https://rakudo.org
Download-Size: 5062 kB APT-Manual-Installed: yes APT-Sources:
https://its-pointless.github.io/files/24 termux/extras arm Packages
Description: Perl 6 implementation on top of Moar virtual machine
Package: rakudo Version: 2020.01-1 Maintainer: Fredrik Fornwall
#fornwall Installed-Size: 93.1 MB Depends: moarvm Homepage:
https://rakudo.org Download-Size: 10.9 MB APT-Sources:
https://its-pointless.github.io/files/24 termux/extras arm Packages
Description: Perl 6 implementation on top of Moar virtual machine
u0_a74#localhost ~/rakudo> raku
CANNOT LINK EXECUTABLE "raku": cannot locate symbol "ffi_type_double"
referenced by "/data/data/com.termux/files/usr/lib/libmoar.so"...
u0_a74#localhost ~/rakudo> raku --version
CANNOT LINK EXECUTABLE "raku": cannot locate symbol "ffi_type_double"
referenced by "/data/data/com.termux/files/usr/lib/libmoar.so"...
u0_a74#localhost ~/rakudo> raku --help
CANNOT LINK EXECUTABLE "raku": cannot locate symbol "ffi_type_double"
referenced by "/data/data/com.termux/files/usr/lib/libmoar.so"...
u0_a74#localhost ~/rakudo> uname -a
Linux localhost 3.4.42-g3d041de #1 SMP PREEMPT Sat Dec 24 19:56:29 PST
2016 armv7l Android
Does it have to be on Termux? I have successfully installed Raku on Android via UserLand, using Debian SSH. sudo apt-get install rakudo works.

Project ERROR: Cannot run compiler 'g++'. Maybe you forgot to setup the environment whithin gitlab env

I've a strange phenomenom happening that I don't know how to investigate.
I hope someone already encountered this an can provide tips
I'm using gitlab CI to build some Qt based projects.
gitlab runner calls a script named build.sh that works just fine when I run it manually as "me" in my env dev.
However runner raises an error stating "Project ERROR: Cannot run compiler 'g++'. Maybe you forgot to setup the environment".
So I made sure g++ was available (g++ -version is OK) and in g++ is in PATH but pbm is still there.
here is part of the script where the problem resides and the investigation I performed
echo ">>>>>> now generating makefiles for ${PROJECT_FILE} <<<<<<"
export QTDIR=/usr/lib64/qt5
echo $QTDIR
echo QMAKESPEC is
qmake-qt5 -query QMAKE_SPEC
echo gcc version is
gcc --version
g++ --version
echo $PWD
whoami
$cmd_qMake -v
$cmd_qMake -makefile -o qMakefile ../src/${PROJECT_FILE}
echo PATH is $PATH
echo QMAKESPEC is
qmake-qt5 -query QMAKE_SPEC
echo gcc version is
gcc --version
g++ --version
and here is the output (sorry; this is in debug mode)
>>>>>> now generating makefiles for Communication.pro <<<<<<
+ export QTDIR=/usr/lib64/qt5
+ QTDIR=/usr/lib64/qt5
+ echo /usr/lib64/qt5
/usr/lib64/qt5
+ echo QMAKESPEC is
QMAKESPEC is
+ qmake-qt5 -query QMAKE_SPEC
linux-g++
+ echo gcc version is
gcc version is
+ gcc --version
gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ g++ --version
g++ (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ echo /root/builds/3188cf72/0/EGNOS_V3/AIV-P/AIV-P/Shared/Communication/.buildchain
/root/builds/3188cf72/0/EGNOS_V3/AIV-P/AIV-P/Shared/Communication/.buildchain
+ whoami
root
+ qmake-qt5 -v
QMake version 3.1
Using Qt version 5.9.2 in /usr/lib64
+ qmake-qt5 -makefile -o qMakefile ../src/Communication.pro
Project ERROR: Cannot run compiler 'g++'. Maybe you forgot to setup the environment?
+ echo PATH is /opt/gcc-7.3.0/bin:/usr/bin:/usr/sbin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/bin
PATH is /opt/gcc-7.3.0/bin:/usr/bin:/usr/sbin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/bin
+ echo QMAKESPEC is
QMAKESPEC is
+ qmake-qt5 -query QMAKE_SPEC
linux-g++
+ echo gcc version is
gcc version is
+ gcc --version
gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ g++ --version
g++ (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ for target in '"${TARGETS[#]}"'
As you can see, g++ seems available un runner's root PATH
So why is qMake failing?
Thanks for your help
Zaluum
I had the same error sudo apt install build-essential worked for me.
Well, finally found it!
Turns out that the error message is not clear at all or at least subject to interpretation.
It was not an issue with gcc that could not be found. It was however a problem with my env.
Root user did not have /usr/local/lib in its LD_LIBRARY_PATH (when I had it).
The reason why is needed is unclear to me but I suspect this is something to do with libisl being necessary for GCC 7.3.0 which is my QMAKE_CC.
Hope this helps somebody
Zaluum
In most of the cases, this is a problem with environment settings - especially path to compiler/toolchain etc.
On Windows it concerns PATH environment variable's setting. For example - when you use minGW toolchain with g++ you should have PATH set e.g.
C:\Qt\Tools\mingw810_64\bin
However sometimes setting it in Windows Control Panel is insufficient, because other application (you have installed) could play with PATH and overrided it. So I recommend to everyone facing this issue and fired all found possible solution, first - to check if printing PATH in cmd (command line Windows tool) follows PATH you have set in Control Panel. If not you can try:
Find reason for PATH is different,
Check if it is not problem described here: https://stackoverflow.com/a/65163187/8389251
Add new Windows User (new account) - and run there Qt Creator and compilation. (Still ensure you have properly set PATH in Control Panel)

Linker only sees a portion of libraries in a directory

In my makefile I have:
g++ -o Out Out.o -I Headers_Directory -L Libraries_Directory -lFile1 -lFile2
In my Libraries_Directory I have two files libFile1.a and libFile2.so
ld finds libFile1.a but cannot find libFile2.so. How that is possible and how can I resolve the issue?
I am compiling in Cygwin and using GNU gcc-g++ compiler.
A minimalist that regenerates the error:
Download the Linux Version of Gurobi here. Then, install the software using this instruction. You need to activate the software by obtaining a license from here. Free academic license for research purpose is available. Finally navigate to the following folder
installation_directory/gurobi701/linux64/examples/build
and issue the command make. You have to compile on Cygwin with GNU gcc-g++ compiler.

Using libdl.so in MinGW

I want to generate a dll file in MinGW, I have several object dependencies in order to do that, one of my object dependencies is libdl.so, I add this object in unix simply as :
g++ xx.o yy.o /usr/lib/libdl.so -o module.so
but in MinGW, I don't have any idea how to add this object. any ideas?
There is a MinGW port of libdl that you can use just like under Unix. Quote from the website:
This library implements a wrapper for dlfcn, as specified in POSIX and SUS, around the dynamic link library functions found in the Windows API.
It requires MinGW to build.
You may get pre-built binaries (with MinGW gcc 3.4.5) and a bundled source code from the Downloads section.
The following commands build and install it in a standard MinGW installation (to be run from your MinGW shell):
./configure --prefix=/ --libdir=/lib --incdir=/include && make && make install
To compile your library as a DLL, use the following command:
g++ -shared xx.o yy.o -ldl -o module.dll
I encountered the same problem (msys2, 32bit version of compiler etc.).
For me I found out that the libdl.a was available in /usr/lib but not in /mingw32/lib. I was able to solve the problem by linking it to the /mingw32/lib folder:
ln -s /usr/lib/libdl.a /mingw32/lib