How to install bc on a unix system under local environment - bc

I am trying ti install bc on my cluster.
I used
./configure --prefix=/home/astha/soft/bc-1.07
followed by
make
but getting below error while executing make
./fbc -c ./libmath.b </dev/null >libmath.h
./fix-libmath_h
./fix-libmath_h: line 1: ed: command not found
make[2]: *** [libmath.h] Error 127
make[2]: Leaving directory `/home/astha/soft/bc-1.07/bc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/astha/soft/bc-1.07'
make: *** [all] Error 2
Is there any workaround for it?

I ran into the same snag building under MingW32. fix-libmath_h is a fairly simple here document for ed. I was able to edit libmath.h using vim and rerun make.
You can pretty much hit ":" and type each line into vim. You don't need to escape the "$" in vim.
If you are not familiar with ed, the script basically deletes the last line, puts all the lines in quotes with a trailing comma and adds a leading brace to the first line and trailing zero and a closing brace to the last line.

Related

What is the best way to build the GNU Scientific Library for use on MinGW?

I'm trying to get GSL version 1.16 built using MinGW but I'm running into some problems. I followed these instructions which involve invoking these commands from within sh.exe.
tar zxvf <the name of your gsl source package>
cd gsl-<the version number of your gsl source package>
./configure --enable-static=yes --enable-shared=yes --prefix=/c/GSL-<version number of gsl source package>
make
make install
I obtained these messages before make gave up.
/usr/bin/sed: can't read <my last name>/gsl-1.16/cblas/libgslcblas.la: No such file or directory
libtool: link: `<my last name>/gsl-1.16/cblas/libgslcblas.la' is not a valid libtool archive
make[2]: *** [libgsl.la] Error 1
make[2]: Leaving directory `/usr/home/<my full name>/gsl-1.16'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/home/<my full name>/gsl-1.16'
make: *** [all] Error 2
Can anyone explain this? Could it be something to do with one of the file paths involving a space between my first last names? Alternatively, does anyone know of me another way to install the GSL which has definitely worked for them?

Makefile error while building mesa

I am getting error as following:
Video card 06:03.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 (rev 0a)
the build command
./autogen.sh --prefix=$WLD --enable-gles2 --disable-gallium-egl \
--with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi \
--with-gallium-drivers=r300,r600,swrast,nouveau --disable-dri3 --disable-llvm-shared-libs
make
make[5]: Entering directory `/home/interns/pooja/mesa-10.2n/src/mesa/drivers/dri/nouveau'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/home/interns/pooja/mesa-10.2n/src/mesa/drivers/dri/nouveau'
Making all in r200
make[5]: Entering directory `/home/interns/pooja/mesa-10.2n/src/mesa/drivers/dri/r200'
CC radeon_buffer_objects.lo
radeon_buffer_objects.c:1:1: error: expected identifier or '(' before '.' token
make[5]: *** [radeon_buffer_objects.lo] Error 1
make[5]: Leaving directory `/home/interns/pooja/mesa-10.2n/src/mesa/drivers/dri/r200'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/interns/pooja/mesa-10.2n/src/mesa/drivers/dri'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/interns/pooja/mesa-10.2n/src/mesa'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/interns/pooja/mesa-10.2n/src/mesa'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/interns/pooja/mesa-10.2n/src'
make: *** [all-recursive] Error 1
I ran into the same error, but as a long-time C programmer, it didn't bother me to look at the source code to see what the compiler was complaining about. Basically, in the "r200" directory are a bunch of files, one of which is radeon_buffer_objects.c, that refer to other files having the same names in another place, but the reference is invalid. You can identify these files easily with the "ls -la" command --every such file has less than 50 characters in it. If you open any of them, you will see the only thing in there is text like this:
../radeon/radeon_buffer_objects.c
Well, the correct way to reference the other file is this:
#include "../radeon/radeon_buffer_objects.c"
So I simply edited all the files that had that problem, in the r200 directory, to correctly reference the other files in the other directory.
Note that the r200 directory has a "server" subdirectory, and in there are also a few files that need to be similarly edited.
After doing that, it compiled OK. That's when I started to write this reply-message. But then the compiler ran into a very similar problem in another directory altogether:
dri_context.c:1:1: error: expected identifer or '(' before '.' token
Well, the fix described above should be fairly generic. I don't yet know how many places might need to be edited, before all of mesa finally compiles successfully, but the edits are simple, if tedious. The only question is why this wasn't fixed over in the repository from which mesa was downloaded!

Apache thrift can not make

When I'm trying to configure and make thrift 0.9.1 it gives some errors. Can anyone tell me the reason for that and what should I do to overcome this issue. Errors are shown in below.
user#linux-yyzo:~/WorkDir/thrift-0.9.1> make
make all-recursive
make[1]: Entering directory `/home/user/WorkDir/thrift-0.9.1'
Making all in compiler/cpp
make[2]: Entering directory `/home/user/WorkDir/thrift-0.9.1/compiler/cpp'
make all-am
make[3]: Entering directory `/home/user/WorkDir/thrift-0.9.1/compiler/cpp'
\
\
/bin/sh ../../ylwrap `test -f 'src/thrifty.yy' || echo './'`src/thrifty.yy y.tab.c thrifty.cc y.tab.h thrifty.h y.output thrifty.output -- yacc -d
../../ylwrap: line 113: yacc: command not found
make[3]: *** [thrifty.cc] Error 1
make[3]: Leaving directory `/home/user/WorkDir/thrift-0.9.1/compiler/cpp'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/user/WorkDir/thrift-0.9.1/compiler/cpp'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/WorkDir/thrift-0.9.1'
make: *** [all] Error 2
user#linux-yyzo:~/WorkDir/thrift-0.9.1>
There are two resources on the Thrift web site worth reading when one runs into troubles like this.
The Requirements give a good overview about the dependencies; the Building From Source page explains build steps and configure switches briefly. Additionally, the requirements page holds some links to more specific information for builds on Ubuntu, CentOS, Windows and OS X.

Error while installing Cyberlink for C++

I am getting the following error when i try to make install Cyberlink4CC
/bin/mkdir -p '/usr/local/include/cybergarage/io'
/usr/bin/install -c -m 644 cybergarage/io/BufferedReader.h cybergarage/io/File.h cybergarage/io/FileInputStream.h cybergarage/io/InputStream.h cybergarage/io/InputStreamReader.h cybergarage/io/LineNumberReader.h cybergarage/io/StringBufferInputStream.h cybergarage/io/FileInputStream.h cybergarage/io/Reader.h cybergarage/io/StringReader.h '/usr/local/include/cybergarage/io'
/usr/bin/install: will not overwrite just-created `/usr/local/include/cybergarage/io/FileInputStream.h' with `cybergarage/io/FileInputStream.h'
make[2]: *** [install-nobase_includeHEADERS] Error 1
make[2]: Leaving directory `/home/bernd/tools/cybergarage/CyberLink4CC/include'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/bernd/tools/cybergarage/CyberLink4CC/include'
make: *** [install-recursive] Error 1
Can anybody help me with this error?
One more question: the changelog on the website for Cyberlink4CC says that there are last changes on 2013-01-09 but on github the last commit was 2 years ago? is this repository somehow outdated? where can i find the current state of the project?
thank you
FileInputStream.h is listed on that command line twice. install appears to be balking at that. That appaers to be a makefile error of some sort.
That repository certainly seems to be out of date. The subversion repo however appears to match that changelog.

Cannot build LLVM and Clang

I have tried to compile clang and llvm using the clang getting started manual. However, at step 5, when I do make, I get the following error. Any idea what is going on here, and how to fix it? Note that I am using Ubuntu 10.04 on a 64 bit x86 system.
cp: cannot stat `/home/MetallicPriest/Desktop/build/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/libcompiler_rt.a': No such file or directory
make[4]: *** [/home/MetallicPriest/Desktop/build/Debug+Asserts/lib/clang/3.1/lib/linux/libclang_rt.full-x86_64.a] Error 1
rm /home/MetallicPriest/Desktop/build/Debug+Asserts/lib/clang/3.1/lib/linux/.dir
make[4]: Leaving directory `/home/MetallicPriest/Desktop/build/tools/clang/runtime/compiler-rt'
make[3]: *** [compiler-rt/.makeall] Error 2
make[3]: Leaving directory `/home/MetallicPriest/Desktop/build/tools/clang/runtime'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/home/MetallicPriest/Desktop/build/tools/clang'
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory `/home/MetallicPriest/Desktop/build/tools'
make: *** [all] Error 1
## Heading ##
The instruction given on this site work!
I had the same problem. As Eli suggested, I got the 3.0 release. It doesn't come with a 'getting started' but you can follow the INSTALL file from clang's root top.
You should be able to copy/paste the following (as root of course for the /usr/local/ part)
export NUMCPU=4 # or however many cores you want to paralell build with
export ORIGDIR=$PWD
wget http://llvm.org/releases/3.0/llvm-3.0.tar.gz
tar -zxf llvm-3.0.tar.gz
cd llvm-3.0.src/tools
wget http://llvm.org/releases/3.0/clang-3.0.tar.gz
tar -zxf clang-3.0.tar.gz
mv clang-3.0.src clang
cd $ORIGDIR
mkdir build
cd build
../llvm-3.0.src/configure --prefix=/usr/local
make -j$NUMCPU
cd tools/clang
make install
--
update, I should also note that following the 'getting started guide' with latest subversion (2012 09 10) actually does work , and i copy/pasted the lines exactly from the 'getting started' page http://clang.llvm.org/get_started.html (including 'optional' stuff) on a Fedora machine on ppc64.