No "sqrtf" in math.h - eclipse

I am working under Ubuntu 11.04 and now engaged in a project whose source code uses routines like "sqrtf" or "lgamma", which are complained by my IDE, claiming that they cannot be found in "math.h". A senior member told me I need POSIX.1-2001. I used ldd --version to check my glibc's version and it gave ldd (Ubuntu EGLIBC 2.13-0ubuntu13) 2.13. I guessed the embedded version of glibc is simplified so I decided to make it upgraded to the full glibc-2.14. But after some search in aptitude I found that I have to do a manual installation. Getting frustrated all the way, I realize maybe the God is warning me off the wrong path. So...can anyone give some hints for me? Thank you~

Is the linker called with argument -lm?

As the comment pointed out, it was a bug of CDT.

Related

compiling error when attempting to install qml package

I'm trying to install qml package in kdb, and encounters the compiling error selecting C floating-point options... not found -ffloat-store is assumed by some libraries.
I've found this post three years ago asking the same question. compiling qml in macOS kdb+/q (CFLAG?) Yet the solution provided doesn't work for me. After brew install gcc and ./configure CC=gcc I still got the same error message.
Besides that, I also have another issue, the configure always recognizes kdb as m64 and version 3. However What I have is m32 and version 4. Does anyone know how I can manually change it? thanks.

libhdf5.so.103: cannot open shared object file

I have met a problem with hdf5 libraries on eclipse CDT. When running a test C++ program, I got prompt information as below:
/home/lsl/Documents/CODE/eclipse-workspace/ReadWriteHDF5/Debug/ReadWriteHDF5:
error while loading shared libraries: libhdf5.so.103: cannot open
shared object file: No such file or directory.
libhdf5.so is confirmed to exist in /usr/local/lib/hdf5-1.10.4/lib and /usr/local/lib/hdf5-1.10.4/lib is within LD_LIBRARY_PATH. Do you have any indications?
Thanks very much!
It looks like Linux is your main operating system. See what happens when you type
sudo apt install libhdf5-dev
since it might supplant the package you're looking for. It worked for me.
I come across similar issue while compiling C++ code that uses Armadillo. Since I have anaconda installed, I find the libhdf5.so.103 file located at ~/anaconda3/lib. After I add the path to LD_LIBRARY_PATH, the error disappears.
I came across exactly the same problem today (perhaps the only difference is that it complaint libhdf5.so.200 was missing). What I eventually found out is that the system (Ubuntu 20.04) already shipped with libhdf5-dev at version 1.10.4, and this conflicted somehow with my installed version 1.12.2. My build command line is as below:
clang++ <...> -L/my/custom/path/to/hdf5-1.12.2/hdf5/lib <...>
Since the system hdf5 is in standard location, the linker finds simultaneously two versions, causing problem.
My solution is:
sudo apt purge libhdf5-dev
Hope it helps.

opening Omnet from ubuntu 11.10

I am new to Omnet++. I installed Omnetpp-3.3p1 and am having trouble opening it. I tried creating a makefile within the project which has simulation codes with command opp_makemake -f -N, but I am getting command opp_makemake not found error. Am I missing something here?
The error might raise if OMNeT++ is not properly installed or the lib is not properly linked. This PDF should be what you are looking for, since it explains how to properly install version 3.3p1. - Hope to help!

rvm installation fails on powerpc ibook g4

I am trying to install ruby version manager on a g4 ibook running 10.4 but I receive two error messages right off the bat when I try to run the first command:
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
bash: line 6: set: errtrace: invalid option name
bash: line 13: conditional binary operator expected
I am new to ruby, rails, and fairly inexperienced with the command line too. I've done a bit of searching and have seen other people having problems installing a specific version of ruby on a powerpc using rvm, but no other examples of someone having a problem installing rvm first of all.
Does this seem like a powerpc issue? Or is there something simple with the command line that I am missing here?
I have also searched on these specific error messages but haven't found any solutions yet. Oh and I should also add that I have xcode installed and I also installed macports because I thought that might help...but it hasn't.
The most probable cause of the error you're getting is your bash version is far too old to be used with any relatively new RVM version. Also, the likelihood of you being able to easily compile rubies on a G4 now is very low. You'll likely end up needing to compile many tools and libraries from source which you'll have to do from the command-line. Finding the right combination of library versions that both support your arch and are still available for download might not be as easy as it sounds. Much of the ruby compilation on OS X depends on libraries that come with Xcode. So, you might hit a wall there too with rubies now requiring newer libraries that can be provided with a version of Xcode that can be installed on your system.
You can try upgrading your bash version and/or use a much older version of RVM, although, I don't remember RVM ever working on 10.4. Or, you can try to compile everything from source, including Ruby. You'll might be able to get Ruby 1.8.6, maybe 1.8.7 working but anything higher is very unlikely.
Good luck =/

Why can't Perl's Class::XSAccessor find Array.so?

This is my first post and I am hoping someone can point me in the right direction. I have tried Google but am not coming up with anything; actually, there are hardly getting any hits so I assume this is going to be a pretty obscure error.
I am trying to run a perl application (squeezecenter-7.3.3) on Solaris 10 and get the following error:
"ld.so.1: perl: fatal: relocation error: file /opt/squeezecenter-7.3.3/CPAN/arch/5.10.0/i86pc-solaris/auto/Class/XSAccessor/Array/Array.so: symbol get_next_arrayindex: referenced symbol not found"
ld.so.1 is in the search path, but I can't figure out what—ld.so.1 or Array.so—is causing the error. Any help will be appreciated.
Thanks
LATE UPDATE 2009-12-04
The current version of Class::XSAccessor contains both Class::XSAccessor itself and Class::XSAccessor::Array. It does not use AutoXS.pm to generate AutoXS.h any more but ships a static copy. Therefore, the problem giving rise to the question shouldn't occur (ever) again.
While Chris Simmons' idea is a good one, this is most certainly not the problem you're having. It is most likely an incompatibility between the version of Class::XSAccessor::Array you're using and the AutoXS::Header version it was compiled with.
A practically guaranteed* fix would be to reinstall Class::XSAccessor from CPAN. It should pick up a compatible version of AutoXS::Header. Maybe you should also post on the SlimDevices/Logitech forum about this.
On a more general note, as the author of both modules in question, I'm not sure why this problem is occurring at all. The dependency on version 1.02 of AutoXS::Header is part of the most recent Class::XSAccessor::Array release. Therefore, if dependencies are met correctly, everything should be fine. It may be some peculiarity of how the SqueezeCenter folks update their bundled modules. If not, feel free to get them in touch with me.
*The one problem remaining may be that the Class::XSAccessor::Array that comes with SqueezeCenter is prefered over the one you installed from CPAN (potentially into the system). In that case, you can try to install it into your /opt/squeezecenter.../CPAN directory.
Reinstall the offending module. Run this as root:
cpan -i Class::XSAccessor::Array Class::XSAccessor
Or manually install it.