Error when making fcgi dev kit - c++

I'm trying to install fcgi dev kit.
But when I make it, below error was showed.
Can't anyone help me?
Thank so much.
**[chivo#localhost fcgi-devel-kit]$ make
(cd libfcgi; make all)
make[1]: Entering directory `/home/chivo/fcgi-devel-kit/libfcgi'
gcc -ansi -pedantic -Wall -Wmissing-prototypes -g -I../include -c -o fcgi_stdio.o fcgi_stdio.c
In file included from fcgi_stdio.c:42:0:
../include/fcgios.h:94:21: warning: ‘struct timeval’ declared inside parameter list
../include/fcgios.h:94:21: warning: its scope is only this definition or declaration, which is probably not what you want
fcgi_stdio.c:54:1: error: initializer element is not constant
fcgi_stdio.c:54:1: error: (near initialization for ‘_fcgi_sF[0].stdio_stream’)
fcgi_stdio.c:54:1: error: initializer element is not constant
fcgi_stdio.c:54:1: error: (near initialization for ‘_fcgi_sF[1].stdio_stream’)
fcgi_stdio.c:54:1: error: initializer element is not constant
fcgi_stdio.c:54:1: error: (near initialization for ‘_fcgi_sF[2].stdio_stream’)
make[1]: *** [fcgi_stdio.o] Error 1
make[1]: Leaving directory `/home/chivo/fcgi-devel-kit/libfcgi'
make: *** [all] Error 2**
I'm using fedora 14, gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4). And I have downloaded newest version of fcgi_dev_kit on this sit: http://www.fastcgi.com/om_archive/applibs/

The version you are trying to build is very old and has some incompatibilities with current systems. I got errors at the configure stage.
I tried the newer version at the homepage and event that one gave errors (trivial) at the compiling stage.
You better fetch the latest version and continue with that...

Related

c++: error: unrecognized command line option ‘-std=c++17’

[ 25%] Building CXX object CMakeFiles/linreg-dlib.dir/linreg_dlib.cc.o
/usr/bin/c++ -I/home/jeong/다운로드/dlib-master -I"/home/jeong/바탕화면/9781789955330_Code/Chapter01/dlib_samples/path to dlib install dir/include" -std=c++17 -msse3 -fopenmp -Wall -Wextra -o CMakeFiles/linreg-dlib.dir/linreg_dlib.cc.o -c /home/jeong/바탕화면/9781789955330_Code/Chapter01/dlib_samples/linreg_dlib.cc
c++: error: unrecognized command line option ‘-std=c++17’
make[2]: *** [CMakeFiles/linreg-dlib.dir/linreg_dlib.cc.o] error 1
make[2]: Leaving directory `/home/jeong/바탕화면/9781789955330_Code/Chapter01/dlib_samples'
make[1]: *** [CMakeFiles/linreg-dlib.dir/all] error 2
make[1]: Leaving directory `/home/jeong/바탕화면/9781789955330_Code/Chapter01/dlib_samples'
make: *** [all] error 2
c++: error: unrecognized command line option ‘-std=c++17’
I am running the practice code using the dlib library.
It runs until'cmake', but the above error appears during'make' process. Need to update gcc?
The gcc version is shown below.
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
How to do it if you need to update the version
I wonder.
The GCC releases page (https://www.gnu.org/software/gcc/releases.html) says that gcc 4.8.5 was released on June 23, 2015.
The GCC developers are really good, but shipping C++17 support two years before C++17 was completed is beyond good.
That compiler may support -std=c++1z for some C++17 features, though.
As others have mentioned your compiler is too old for C++17.
It sounds like you are on either RHEL 7 or CentOS 7. Those OSes support installation of "Developer Toolsets" with newer versions of the compiler and toolchain (in addition to the standard system compiler).
This might be an option for you.
For RHEL 7 see: https://access.redhat.com/documentation/en-us/red_hat_developer_toolset/10/
For CentOS see: https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/

Cannot convert ‘bool’ to ‘gzFile {aka gzFile_s*}’

I am new to Linux environments, and trying to install a bioinformatics package (vcftools - https://vcftools.github.io/examples.html). For some reason I can compile without a problem in a Cygwin environment, other colleagues have installed the package without a glitch, but i get an error (per below) if I try to compile in an Ubuntu environment in a VirtualBox on the same computer. I get the following error. Does anyone have a suggestion on how to resolve this error?
$make install
output
Installing VCF tools
make[1]: Entering directory '/home/wde/selt/selectionTools/vcftools_0.1.11/cpp'
g++ -c -O2 -D_FILE_OFFSET_BITS=64 vcftools.cpp -o vcftools.o
g++ -MM -O2 -D_FILE_OFFSET_BITS=64 vcftools.cpp > vcftools.d
g++ -c -O2 -D_FILE_OFFSET_BITS=64 bcf_file.cpp -o bcf_file.o
g++ -MM -O2 -D_FILE_OFFSET_BITS=64 bcf_file.cpp > bcf_file.d
g++ -c -O2 -D_FILE_OFFSET_BITS=64 vcf_file.cpp -o vcf_file.o
vcf_file.cpp: In constructor ‘vcf_file::vcf_file()’:
**vcf_file.cpp:25:13: **error: cannot convert ‘bool’** to ‘gzFile {aka gzFile_s*}’ in assignment**
gzvcf_in = false;
^~~~~
Makefile:53: recipe for target 'vcf_file.o' failed
make[1]: *** [vcf_file.o] Error 1
make[1]: Leaving directory '/home/wde/selt/selectionTools/vcftools_0.1.11/cpp'
/bin/sh: 2: cd: can't cd to perl
Makefile:24: recipe for target 'install' failed
make: *** [install] Error 2
error with make
Basically what the makefile does is automating the calls to the compiler.
Thus, the output from the makefile is similar to usual compile errors you get, compiling a source file from within the command line.
The important line from the error log above is:
vcf_file.cpp: In constructor ‘vcf_file::vcf_file()’:
**vcf_file.cpp:25:13: **error: cannot convert ‘bool’** to ‘gzFile {aka gzFile_s*}’ in assignment**
gzvcf_in = false;
gzvcf_in is of type pointer to gzFile_s. Assigning a bool variable to a pointer type won't compile.
Thus, the error message. Replace, inside the vcf_file.cpp, false with the pointer literal std::nullptr or the macro NULL and re-run the makefile.
Btw. I checked the vcf_file.cpp file in the github repo from vcf. They do not contain the line leading to the above error. May you have an outdated / modified version, introducing the compiler error.

Update g++ reached from NetBeans under OS X

I am trying to build a C++ project in NetBeans 8.2 under OS X with the C++14 standard. However, I am always getting the error while trying to build:
g++ -c -g -std=c++14 -MMD -MP -MF "build/Debug/GNU-MacOSX/test.o.d" -o build/Debug/GNU-MacOSX/test.o test.cpp
error: invalid value 'c++14' in '-std=c++14'
make[2]: *** [build/Debug/GNU-MacOSX/test.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 570ms)
Nevertheless, I can run the same command from the terminal without any problems. My version of g++ is 7.0.0, and so the C++14 standard is fully supported.
Therefore, it seems like NetBeans tries to run some older version of g++, which was probably supplied with the system but now is replaced with a new one. To this I have two questions:
How can it be possible that default versions in the terminal and NetBeans are different?
How can I configure NetBeans to work with the terminal default version?
EDIT:
In the terminal which g++ yields /opt/local/bin/g++. The same is in the field Preferences -> C/C++ -> C++ compiler. Adding the --version argument in NetBeans yields Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn), which is definitely different from the console version. So, I still do not understand: why calling g++ under the same path resolves to different versions in NetBeans and the terminal?

Building gold linker with MinGW on Windows, FLEX/bison 'YYSTYPE' was not declared in this scope

I'm trying to build the gold linker included with GNU binutils using mingw. The steps I have taken-
Install mingw with all packages using the installer.
Install the windows version of FLEX to the default location using the windows installer.
Run ./configure in the gold linker directory from the mingw shell which seems to work fine
Run make, this is where I'm getting some errors.
I've included the complete output of ./configure and make in a pastebin here:
http://pastebin.com/1XLkZVVm
But the important part is this:
make[2]: Entering directory `c:/binutils-2.23.1/binutils-2.23.1/gold'
g++ -DHAVE_CONFIG_H -I. -I. -I./../include -I./../elfcpp -DLOCALEDIR="\"/usr/lo
cal/share/locale\"" -DBINDIR="\"/usr/local/bin\"" -DTOOLBINDIR="\"/usr/local//bi
n\"" -DTOOLLIBDIR="\"/usr/local//lib\"" -W -Wall -Wno-format -Werror -D_LAR
GEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=expression.o -MT expression.
o -MD -MP -MF .deps/expression.Tpo -c -o expression.o expression.cc
In file included from expression.cc:33:0:
script-c.h:221:7: エラー: 'yylex' initialized and declared 'extern' [-Werror]
script-c.h:221:7: エラー: 'YYSTYPE' was not declared in this scope
script-c.h:221:15: エラー: expected primary-expression before ',' token
script-c.h:221:17: エラー: expected primary-expression before 'void'
script-c.h:221:30: エラー: expression list treated as compound expression in ini
tializer [-fpermissive]
cc1plus.exe: all warnings being treated as errors
make[2]: *** [expression.o] Error 1
make[2]: Leaving directory `c:/binutils-2.23.1/binutils-2.23.1/gold'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `c:/binutils-2.23.1/binutils-2.23.1/gold'
make: *** [all] Error 2
I've looked in the script-c.h file and it has this function:
/* Called by the bison parser skeleton to return the next token. */
extern int
yylex(YYSTYPE*, void* closure);
However YYSTYPE is not defined anywhere that I can find.
I'm new to using mingw and msys so I may have missed some steps somewhere. Any help getting this to build would be really appreciated.
As this question had lain unanswered for some months, I looked into the problem.
I downloaded binutils-2.25 (latest at this date) and tried to follow your actions.
I discovered that if you only build gold without the rest of binutils it does not build. If you perform a ./configure and make at the top level it builds the gold fine. If you then cd gold and do the ./configure and make (albeit unnecessarily) then it works fine also.
I did find that when it failed on gold alone it got further than your build did.
My attention was also drawn to your phrase FLEX to the default location. The instructions with FLEX make it clear that you should not rely on the default location (which may be /Program Files/ or similar) but must use path that does not contain any spaces. If you had not noticed this, then that is your fault.
As the latest builds, you can get gold working by ensuring you have installed flex (and bison) properly in non-space paths, then downloading 2.25 and building the whole of binutils rather than gold alone.
I hope this analysis is useful for someone who comes later and finds similar issues.

Fail to compile erlang r14b03

I'm having trouble building erlang (r14b03) on Mac OS Lion. I've had these same issues (exact same trace) trying to install erlang on Crunchbang Linux - and I'm totally confused. Here is the error I'm getting:
...
make[5]: Nothing to be done for `all'.
make -f i386-apple-darwin11.3.0/Makefile TYPE=opt
llvm-gcc-4.2 -c -O3 -m64 -O0 -I/Users/john/.kerl/builds/r14b03/otp_src_R14B03/erts/i386-apple-darwin11.3.0 -no-cpp-precomp -D_XOPEN_SOURCE -DHAVE_CONFIG_H -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -DERLANG_INTEGRATION -o /Users/john/.kerl/builds/r14b03/otp_src_R14B03/erts/emulator/pcre/obj/i386-apple-darwin11.3.0/opt/pcre_exec.o pcre_exec.c
pcre_exec.c: In function ‘match’:
pcre_exec_loop_break_cases.inc:44: error: label ‘L_LOOP_COUNT_47’ used but not defined
pcre_exec_loop_break_cases.inc:43: error: label ‘L_LOOP_COUNT_46’ used but not defined
...
pcre_exec_loop_break_cases.inc:3: error: label ‘L_LOOP_COUNT_6’ used but not defined
pcre_exec_loop_break_cases.inc:2: error: label ‘L_LOOP_COUNT_5’ used but not defined
pcre_exec_loop_break_cases.inc:1: error: label ‘L_LOOP_COUNT_4’ used but not defined
make[5]: *** [/Users/john/.kerl/builds/r14b03/otp_src_R14B03/erts/emulator/pcre/obj/i386-apple-darwin11.3.0/opt/pcre_exec.o] Error 1
make[4]: *** [opt] Error 2
make[3]: *** [pcre] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [smp] Error 2
make: *** [emulator] Error 2
I'm using kerl (although I've also tried without it), and the following .kerlrc:
CFLAGS=-O0
KERL_CONFIGURE_OPTIONS="--enable-hipe --enable-smp-support --enable-threads --enable-kernel-poll --enable-darwin-64bit"
Any ideas?
See how to add env variables for building Erlang in kerl - using shell export command inside .kerlrc will help.
I guess trying Building a fast Erlang VM on Mac OS Lion (from the Installation Guide) will help.