PDA

View Full Version : SEQ 5.13 Error Compiling: everquest.h:2686:46: error: flexible array member in union



grump
08-09-2017, 10:14 AM
Hello Folks,

I'm having an issue compiling SEQ on Fedora 26, my ./configure comes out just fine but I get the following error during make:


make all-recursive
make[1]: Entering directory '/home/grump/Downloads/showeq-5.13.10.53'
Making all in src
make[2]: Entering directory '/home/grump/Downloads/showeq-5.13.10.53/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/lib64/qt-3.3/include -I. -DPKGDATADIR=\"/usr/local/share/showeq/\" -I/usr/include/pcap -D_REENTRANT -O2 -Wall -g -ggdb -DDEBUG -finline-functions -DQT_THREAD_SUPPORT=1 -DDISPLAY_ICONS=false -DICON_DIR=\"/eq-icons/\" -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cpp
In file included from interface.h:32:0,
from main.cpp:44:
everquest.h:2686:46: error: flexible array member in union
struct bazaarSearchResponseStruct response[];
^
make[2]: *** [Makefile:562: main.o] Error 1
make[2]: Leaving directory '/home/grump/Downloads/showeq-5.13.10.53/src'
make[1]: *** [Makefile:349: all-recursive] Error 1
make[1]: Leaving directory '/home/grump/Downloads/showeq-5.13.10.53'
make: *** [Makefile:278: all] Error 2


Any ideas what might be wrong?

My full config.log is here.
(https://pastebin.com/ev58SvBW)

You can see here ./configure is happy:


=>>./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for g++... g++
checking for supported compiler version... checking for style of include used by make... GNU
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for an ANSI C-conforming const... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for supported libc version... yes
checking for X... libraries , headers
checking for IceConnectionNumber in -lICE... yes
checking for libXext... yes
checking for extra includes... no
checking for extra libs... no
checking for libz... -lz
checking for libpng... -lpng -lz -lm
checking for Qt... yes
>> Found version.: 3.3.8b
>>> Headers......: /usr/lib64/qt-3.3/include/
>>>> Libraries...: /usr/lib64/qt-3.3/lib/
>>>> Documentation...: Unable to locate?!?
configure: WARNING: Qt documenation not installed?!
>>>>> Workable...: -*{ YES }*-
checking for Qt MOC... yes
checking for Qt UIC... yes
checking if Qt compiles without flags... no
checking for pthread_create in -lpthread... yes
setting Linux pthread compilation options
checking for pcap_open_live in -lpcap... yes
checking for gdImageCreate in -lgd... no
checking for gdImagePng in -lgd... no
checking for inflate in -lz... yes
checking for ANSI C header files... (cached) yes
checking deque usability... yes
checking deque presence... yes
checking for deque... yes
checking for size_t... yes
checking whether to enable debugging code and flags... yes
checking whether to build with optimization enabled... yes
checking whether to build with code inlined... yes
checking whether to build with profiling... no
checking whether to build for use with the test server... no
checking for rpath... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating conf/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
Success!
Please run:
make

Thanks for any pointers or guidance here.

grump
08-09-2017, 10:24 AM
Ok, I found a workaround:

In ../src/everquest.h line 2686

Replace:


struct bazaarSearchResponseStruct response[];


With:


struct bazaarSearchResponseStruct response[0];

I found reference to this via the following gcc bug report (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69550).

SEQ now builds fine on the latest Fedora 26



ShowEQ 5.13.10.53, released under the GPL.
SINS 0.5, released under the GPL.
All ShowEQ source code is Copyright (C) 2000-2010 by the respective ShowEQ Developers
ShowEQ comes with NO WARRANTY.

You may redistribute copies of ShowEQ under the terms of
The GNU General Public License.
See: http://www.gnu.org/copyleft/gpl.html for more details...

For updates and information, please visit http://seq.sourceforge.net/
ShowEQ 5.13.10.53, Built from 'main.cpp' on Aug 9 2017 at 17:20:21
CVS: @(#) $Id: main.cpp 760 2012-03-10 05:17:33Z ngdeao $ $Name$
Using GCC version: 7.1.1
Using glibc version: 2.25
Using Qt version: 3.3.8b
Running on Linux release 4.11.11-300.fc26.x86_64 for processor x86_64

EQPlayer
02-09-2018, 07:29 PM
Hi grump (http://www.showeq.net/forums/member.php?16633-grump) could you please leave a comment with all the Terminal commands you used to install and compile ShowEQ using Fedora 26.
I have just installed Fedora 26 on a PC but I am not Linux clued up I have done the above changing the Struct line.

wxh
02-11-2018, 05:06 AM
If you're more of a Windows user, I'd suggest instead just downloading Visual Studio 2010 Express and using that as your development environment.

Download the source from sourceforge, and unzip, preserving the directory structure. Then, using Visual C++ 2010, just open the .vcproj file, and you can just right-click the project name in the solution explorer (MySEQ.server or MySEQ.client) and select build. Visual studio will automatically create a folder called "Program Files (x86)" at the same level as the base directory where you unZIPped the source package, underneath which will be a "MySEQ" directory, and your compiled file will end up there.

Hidron
02-11-2018, 11:41 AM
This might get more attention if it was moved to the SEQ section where it belongs. Not sure how many of those people actually read the area for the Windows program.

BlueAdept
02-11-2018, 12:08 PM
Moved to correct area.

I just noticed that EQPlayer resurrected an OLD thread. I do not know if this change was ever implemented or not.

Newby
02-11-2018, 02:15 PM
I had this same issue when I upgraded to Debian Stretch. Solved it by installing a backlevel gcc/g++:



# apt-get install gcc-4.9 g++-4.9
# CXX=g++-4.9 CC=gcc-4.9 ./configure


Other distros might have something similar.

EQPlayer
02-11-2018, 03:08 PM
Yeah sorry Blue didnt notice at the time how old the post was :/