NginX 0.9.6 Frustrating Compile Issues Ubuntu/GCC 4.6.1 - gcc

Today I've been working on setting up extra VPS clones and I've run into a strange and frustrating compile time error with the latest nginx development version (0.9.6).
I'm running Ubuntu 10.04.2 LTS x86_64, however, I've upgraded GCC to 4.6.1. ./configure runs without errors, but upon running make -j4 I'm presented with the following error:
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/ngx_open_file_cache.o \
src/core/ngx_open_file_cache.c
src/core/ngx_resolver.c: In function
'ngx_resolver_process_ptr':
src/core/ngx_resolver.c:1425:43:
error: variable 'qclass' set but not
used [-Werror=unused-but-set-variable]
src/core/ngx_resolver.c:1425:36:
error: variable 'qtype' set but not
used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as
errors
make[1]: *
[objs/src/core/ngx_resolver.o] Error 1
make[1]: * Waiting for unfinished
jobs.... make[1]: Leaving directory
`/root/nginx-0.9.6' make: *** [build]
Error 2
(Better seen at pastebin: http://pastebin.com/g0bNS2nY)
I've tried adding --with--cc-opt="-W" to the ./configure options but without result. Can anyone please shed some light on this show stopper?
Many, many thanks in advance!

A nicer way to do this is to pass the following to ./configure
--with-cc-opt=-Wno-error

Edit the Makefile, remove -Werror. That options means: quit the compiler immediately if something doesn't seem right. Or run the compile command that went wrong manually, again without the -Werror flag:
gcc -c -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function \
-Wunused-variable -Wunused-value -g -Isrc/core -Isrc/event \
-Isrc/event/modules -Isrc/os/unix -Iobjs \
-o objs/src/core/ngx_open_file_cache.o src/core/ngx_open_file_cache.c

Related

Error Compiling pidgin on windows

Good day, I have been trying to compile pidgin on Windows 8 for some time now. I have been able to download all necessary files and put them in the correct folders, but when I attempt to use
$ make -f Makefile.mingw install
I get the following:
$ make -f Makefile.mingw install
make -C ../pidgin -f Makefile.mingw pidgin.dll
make[1]: Entering directory '/cygdrive/c/PidginBuild/pidgin-2.10.11/pidgin'
make -C ../libpurple -f Makefile.mingw libpurple.dll
make[2]: Entering directory '/cygdrive/c/PidginBuild/pidgin-2.10.11/libpurple'
gcc.exe -O2 -Wall -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wextra -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef -Wstack-protector -fwrapv -fno-strict-overflow -Wno-missing-field-initializers -Wformat-security -fstack-protector-all --param ssp-buffer-size=1 -pipe -mms-bitfields -g -DHAVE_CYRUS_SASL -DHAVE_CONFIG_H -DWIN32_LEAN_AND_MEAN -I../libpurple -I../libpurple/win32 -I.. -I../../win32-dev/gtk_2_0-2.14/include -I../../win32-dev/gtk_2_0-2.14/include/glib-2.0 -I../../win32-dev/gtk_2_0-2.14/lib/glib-2.0/include -I../../win32-dev/libxml2-2.9.0/include/libxml2 -o account.o -c account.c
In file included from account.c:26:0:
internal.h:128:18: fatal error: glib.h: No such file or directory
#include <glib.h>
^
compilation terminated.
../libpurple/win32/rules.mak:4: recipe for target 'account.o' failed
make[2]: *** [account.o] Error 1
make[2]: Leaving directory '/cygdrive/c/PidginBuild/pidgin-2.10.11/libpurple'
../libpurple/win32/targets.mak:31: recipe for target '../libpurple/libpurple.dll.a' failed
make[1]: *** [../libpurple/libpurple.dll.a] Error 2
make[1]: Leaving directory '/cygdrive/c/PidginBuild/pidgin-2.10.11/pidgin'
../libpurple/win32/targets.mak:37: recipe for target '../pidgin/pidgin.dll.a' failed
make: *** [../pidgin/pidgin.dll.a] Error 2
Does anyone know how I can solve this? I've tried performing searches but I can't find anything.
You've apparently been at this for several days:
Error Compiling pidgin on windows
https://stackoverflow.com/questions/33667459/trouble-compiling-pidgin-on-windows
https://stackoverflow.com/questions/33695459/microsoft-manifest-tool-must-be-included-in-your-path
cygwin: cannot determine mount points
Q: Have you got it working yet?
If not, please look here:
https://developer.pidgin.im/wiki/BuildingWinPidgin
https://developer.pidgin.im/wiki/BuildingWinPidgin/3.0.0

Compiling gcc itself, on windows for windows targetting arm: "cc1.exe: out of memory allocating 2278450599 bytes"

I am following
http://www.mingw.org/wiki/hostedcrosscompilerhowto
and issuing
make all-gcc | tee make-c-only.log 2>&1
yields
gcc -c -O2 -pipe -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings
-Wstrict-p rototypes -Wmissing-prototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I . -I. -I../../../../gcc-core-3.4.2-20040916-1-src/gcc-3.4.2-20040916-1/gcc -I../ ../../../gcc-core-3.4.2-20040916-1-src/gcc-3.4.2-20040916-1/gcc/.
-I../../../../ gcc-core-3.4.2-20040916-1-src/gcc-3.4.2-20040916-1/gcc/../include
insn-modes.c
-o insn-modes.o
**cc1.exe: out of memory allocating 2278450599 bytes** make[1]: ***
[insn-modes.o] Error 1 make[1]: Leaving directory
`/e/Lorin/gcc/aufWindows7MingwOrgHowto/build/arm-elf/ gcc/gcc' make:
*** [all-gcc] Error 2
I do have 2GB of free memory.
EDIT: Will try to use 64bit mingw-w64 5.2.0 with the last MSYS-20111123.zip.
As I was using a 32bit distribution of mingw the compiler cannot allocate beyond 2GB of RAM for itsself, regardless of whether this was a bug or not.
A solution to this error was to use a newer version of gcc for windows ie. the one from the "mingw-w64" project.
Note: Don't get yourself confused, the mingw-w64 project also has a 32bit version available even though the project is called mingw-w64

install protocol buffer compiler error under Mac

I installed the protobuf complier following:
Download Protocol Buffers full source from here: http://code.google.com/p/protobuf/downloads/list
Extract it and go to the extraction directory from terminal
1.Run ./configure
2.Run make
3.Run sudo make install
After I run make, the error shows. someone know how to fix it?
Thanks in advance!!
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in .
Making all in src
/bin/sh ../libtool --tag=CXX --mode=link g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG -D_THREAD_SAFE -o protoc main.o libprotobuf.la libprotoc.la -lz
libtool: link: cannot find the library 2/src/libprotobuf.la' or unhandled argument2/src/libprotobuf.la'
make[2]: * [protoc] Error 1
make[1]: * [all-recursive] Error 1
make: * [all] Error 2
I'm seeing this too - and I diagnosed the problem. It's simple enough - the download directory path contains a space character. Simply move or rename the download directory so it no longer contains a space character and everything works.
Please see my bug report here.

"llvm-g++: command not found" while building BitCoin

I was following this guide:
When I ran:
make -f makefile.osx USE_UPNP=-
here is what I got in the terminal:
/bin/sh ../share/genbuild.sh obj/build.h
fatal: bad default revision 'HEAD'
llvm-g++ -c -g -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE -DUSE_IPV6 -DUSE_UPNP=- -DHAVE_BUILD_INFO -I"/Users/Bob/mycoin/src" -I"/Users/Bob/mycoin/src"/obj -I"/opt/local/include" -I"/opt/local/include/db48" -MMD -MF obj/version.d -o obj/version.o version.cpp
/bin/sh: llvm-g++: command not found
make: *** [obj/version.o] Error 127
Since Xcode 5 doesn't ship with llvm-g++ anymore, you need to install it manually. One of the possible ways is to install command-line tools.
Another option is to just set CXX to g++ in makefile.osx.

"jpeglib.h: No such file or directory" ghostscript port in OPENBSD

Hello I have a problem with compiling a ghostscript from ports in openbsd 4.7.
SO i have jpeg-7 installed, I have latest port tree for obsd4.7.
===> Building for ghostscript-8.63p11
mkdir -p /usr/ports/pobj/ghostscript-8.63p11/ghostscript-8.63/obj
gmake LDFLAGS='-L/usr/local/lib -shared' GS_XE=./obj/../obj/libgs.so.11.0 STDIO_IMPLEMENTATION=c DISPLAY_DEV=./obj/../obj/display.dev BINDIR=./obj/../obj GLGENDIR=./obj/../obj GLOBJDIR=./obj/../obj PSGENDIR=./obj/../obj PSOBJDIR=./obj/../obj CFLAGS='-O2 -fno-reorder-blocks -fno-reorder-functions -fomit-frame-pointer -march=i386 -fPIC -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -fno-builtin -fno-common -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/local/lib/ghostscript/8.63\"' prefix=/usr/local ./obj/../obj/gsc
gmake[1]: Entering directory `/usr/ports/pobj/ghostscript-8.63p11/ghostscript-8.63'
cc -I./obj/../obj -I./src -DHAVE_MKSTEMP -O2 -fno-reorder-blocks -fno-reorder-functions -fomit-frame-pointer -march=i386 -fPIC -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -fno-builtin -fno-common -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/local/lib/ghostscript/8.63\" -DGX_COLOR_INDEX_TYPE='unsigned long long' -o ./obj/../obj/sdctc.o -c ./src/sdctc.c
In file included from src/sdctc.c:17:
obj/jpeglib_.h:1:21: jpeglib.h: No such file or directory
In file included from src/sdctc.c:19:
src/sdct.h:58: error: field `err' has incomplete type
src/sdct.h:70: error: field `err' has incomplete type
src/sdct.h:72: error: field `cinfo' has incomplete type
src/sdct.h:73: error: field `destination' has incomplete type
src/sdct.h:84: error: field `err' has incomplete type
src/sdct.h:87: error: field `dinfo' has incomplete type
src/sdct.h:88: error: field `source' has incomplete type
gmake[1]: *** [obj/../obj/sdctc.o] Error 1
gmake[1]: Leaving directory `/usr/ports/pobj/ghostscript-8.63p11/ghostscript-8.63'
gmake: *** [so] Error 2
*** Error code 2
Stop in /usr/ports/print/ghostscript/gnu (line 2225 of /usr/ports/infrastructure/mk/bsd.port.mk).
I tried to place one more param in CFLAGS in Makefile with value "-I/usr/local" but no luck =(
People in irc [freenode server, #openbsd channel] refuses give any help for ports at all, and even more - because this is 4.7 unstable version.
I have my reasons to use this version and ports believe me =)
CFLAGS+= -DSYS_TYPES_HAS_STDINT_TYPES \
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/ijs \
-I${LOCALBASE}/include/libpng \
ok nevermind, I just recompiled whole userland and now it's ok=)
You can find where jpeglib.h is by using find:
find / -name jpeglib.h
Once you know the path it's in, you can add the correct -I flag.

Resources