Apache thrift can not make - c++

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.

Related

cross compiling protocol buffers for arm

I am new to Google's protocol buffers and I am having trouble with cross-compiling it for arm. I am not able to find any concrete solutions to my problem using google.
The steps I am following:
./autogen.sh
./configure
make -s && make install
./configure --host=arm-linux-gnueabi CC=arm-linux-gnueabi-gcc --prefix=/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/ --with-protoc=/usr/local/bin/protoc
make
I get an error when I run make.
google/protobuf/stubs/common.cc:55:2: error: #error "No suitable threading library available."
#error "No suitable threading library available."
^
Makefile:3956: recipe for target 'google/protobuf/stubs/common.lo' failed
make[2]: *** [google/protobuf/stubs/common.lo] Error 1
make[2]: Leaving directory '/home/protobuf/protobuf/src'
Makefile:1544: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/protobuf/protobuf'
Makefile:1451: recipe for target 'all' failed
make: *** [all] Error 2
Any help would be much appreciated.

Cannot "make" verlihub on Debian

I'm trying to create my own dchub on Debian using Verlihub. Everything works great when I'm using ./configure but when I'm trying to "make", it ends with an error! Please help!
./configure gives back:
Configure has completed successfully. Now you must run make.
If make fails with errors, please consult the forums and see
if anyone else has had the same issue. The forums are located
here http://forums.verlihub-project.org
Extensive documentation is also available at the project website
which can be found here http://www.verlihub-project.org
Please feel free to join and register at the Verlihub suport
hub located here dchub://hub.verlihub-project.org:7777
sudo make gives back:
stringutils.cpp: In function 'void nStringUtils::ExpandPath(std::string&)':
stringutils.cpp:127:31: error: 'get_current_dir_name' was not declared in this scope
make[2]: *** [stringutils.lo] Error 1
make[2]: Leaving directory `/verlihub-0.9.8e-r2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/verlihub-0.9.8e-r2'
make: *** [all] Error 2

Error when building with codeLite in Windows using cygwin64

C:\Windows\system32\cmd.exe /C "C:/cygwin64/bin/make.exe -j4 -e -f Makefile"
----------Building project:[ clockType - Debug ]----------
make[1]: *** No rule to make target 'Debug/clockType.cpp.o', needed by 'Debug/clockType'. Stop.
make[1]: *** Waiting for unfinished jobs....
make[1]: Entering directory '/home/Trevor/CSCI_3232/clockType'
make[1]: Leaving directory '/home/Trevor/CSCI_3232/clockType'
make: *** [All] Error 2
Makefile:4: recipe for target 'All' failed
1 errors, 0 warnings
I have been getting this error whenever I try to build anything with codelite and cygwin64(g++). Even a simple hello world application that runs fine in the cygwin64 terminal. I assume it is something wrong I am doing with codelite. Thanks for your help. This is my first time dealing with c++ outside of class, have no problems with java and eclipse. I downloaded codelite because it was the first link when I googled c++ ide no idea if it is any good or not.

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!

Makefile install target sometimes working, sometimes not

I'm currently working on a project that should also provide a source package to be packaged into linux systems. Since I'm using monodevelop, I used
mdtool generate-makefiles AudioCuesheetEditor.sln --simple-makefiles
to generate makefiles,etc. But there is a little problem. On some system everything works fine when running the last step
make install
but sometimes not. The output then says
[root#VMFedora17 Downloads]# make install
make[1]: Entering directory `/home/sven/Downloads'
make[1]: Leaving directory `/home/sven/Downloads'
make[1]: Entering directory `/home/sven/Downloads'
make pre-install-local-hook prefix=/usr/local
make[2]: Entering directory `/home/sven/Downloads'
make[2]: Leaving directory `/home/sven/Downloads'
make install-satellite-assemblies prefix=/usr/local
make[2]: Entering directory `/home/sven/Downloads'
mkdir -p '/usr/local/lib'
cp bin/Release /usr/local/lib/AudioCuesheetEditor
cp: omitting directory `bin/Release'
make[2]: *** [/usr/local/lib/AudioCuesheetEditor] Error 1
make[2]: Leaving directory `/home/sven/Downloads'
make[1]: *** [install-local] Error 2
make[1]: Leaving directory `/home/sven/Downloads'
make: *** [install-recursive] Error 1
This was run on a Fedora 17 Linux with KDE installed. On another Fedora 17 KDE everything went perfect.
Could somebody help me, where the error is?
Makefile can be found here: http://sourceforge.net/p/audiocuesheet/code/140/tree/trunk/Quellcode/AudioCuesheetEditor.make
Thanks for your help!
From your output and the link you provided, I found the error in the following snippet:
install-local: $(ASSEMBLY) $(ASSEMBLY_MDB)
make pre-install-local-hook prefix=$(prefix)
make install-satellite-assemblies prefix=$(prefix)
mkdir -p '$(DESTDIR)$(libdir)/$(PACKAGE)'
$(call cp,$(ASSEMBLY),$(DESTDIR)$(libdir)/$(PACKAGE))
I guess $(ASSEMBLY) was a directory, but I am not sure. And the command cp without the parameter -r will not copy the directory recursively. You can try to modify
$(call cp,$(ASSEMBLY),$(DESTDIR)$(libdir)/$(PACKAGE))
to
$(call cp,-r,$(ASSEMBLY),$(DESTDIR)$(libdir)/$(PACKAGE))
or
cp -r $(ASSEMBLY) $(DESTDIR)$(libdir)/$(PACKAGE)
Additionally, if you want to find out why the original works on one machine but not on the another, you can add a command:
echo $(ASSEMBLY)
before the above command to see if the output of them are different on different machines.