Home » U++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » OpenBSD porting problem
OpenBSD porting problem [message #7672] |
Sun, 14 January 2007 22:45  |
masu
Messages: 378 Registered: February 2006
|
Senior Member |
|
|
I try to port upp to openbsd at the moment.
What I have tried so far is to take upp version 701.r48 from my freebsd box with freshly generated Makefile for building on openbsd 3.7.
The error I get is when compiling the first file, command line:
c++ -c -O2 -march=pentium -x c++ -I../ -I/usr/X11R6/include -I/usr/local/include -I/usr/X11R6/include/freetype2 -DflagGUI -DflagGCC -DflagOPENBSD -DflagMAIN ../ide/SelectPkg.cpp -o ../../out/ide/GCC32-Freebsd-Gcc-Gui-Main/SelectPkg.o
Error is:
In file included from ../Core/Core.h:375,
from ../Draw/Draw.h:4,
from ../CtrlCore/CtrlCore.h:4,
from ../CtrlLib/CtrlLib.h:4,
from ../ide/Common/Common.h:4,
from ../ide/ide.h:4,
from ../ide/SelectPkg.cpp:1:
../Core/String.h:633: error: syntax error before `&' token
../Core/String.h:634: error: syntax error before `)' token
../Core/String.h:634: error: ISO C++ forbids declaration of `<invalid operator>' with no type
GCC version is 3.3.5.
Any idea?
Matthias
|
|
|
|
Re: OpenBSD porting problem [message #19276 is a reply to message #7672] |
Sun, 23 November 2008 23:58   |
masu
Messages: 378 Registered: February 2006
|
Senior Member |
|
|
Hi Mirek,
I'll give it another try, now.
I bought an eeePC and installed OpenBSD 4.4 on it.
Default compiler is GCC 3.3.5.
I downloaded Upp 2008.1 and adjusted sources and Makefile to compile fine, but in static, NOGTK, debug mode.
Then when I want to start TheIDE, I get an segfault in VCont.h asserting about Container size.
After debugging, I have found that the error occurs at line 437 in Draw/Image.cpp.
Here is part of the debug session:
437 m.image = cached[i];
(gdb) p cached
$15 = {<Upp::MoveableAndDeepCopyOption<Upp::Vector<Upp::Image>, Upp::EmptyClass>> = {<Upp::Moveable<Upp::Vector<Upp::Image>, Upp::DeepCopyOption<Upp::Vector<Upp::Image>, Upp::EmptyClass> >> = {<Upp::DeepCopyOption<Upp::Vector<Upp::Image>, Upp::EmptyClass>> = {<Upp::EmptyClass> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, vector = 0x0, items = 0, alloc = 0}
(gdb) p i
$16 = 0
(gdb) bt
#0 Upp::Iml::Get (this=0x3c3f9c60, i=0) at uppsrc/Draw/Image.cpp:437
#1 0x1c3d4e30 in Upp::Override (target=@0x3c3f9c60, source=@0x3c3f9c60,
colored=true) at uppsrc/Draw/Cham.cpp:554
#2 0x1c3d4ef6 in Upp::ColoredOverride (target=@0x3c3f9c60, source=@0x3c3f9c60)
at uppsrc/Draw/Cham.cpp:564
#3 0x1c26a576 in Upp::ChStdSkin () at uppsrc/CtrlLib/Ch.cpp:22
#4 0x1c403cc4 in Upp::Ctrl::ChSync () at uppsrc/CtrlCore/Ctrl.cpp:882
#5 0x1c42897f in Upp::Ctrl::InitX11 (display=0x0)
at uppsrc/CtrlCore/X11App.cpp:375
#6 0x1c0a95d4 in main (argc=1, argv=0xcfbf9d10, envptr=0xcfbf9d18)
at uppsrc/ide/idewin.cpp:672
As you can see cached is empty, that means assignment at line 432 gave an empty image vector.
I hope you'll find it worth to get Upp also running on OpenBSD, even if it is not a frequently used development plattform.
Regards,
Matthias
|
|
|
Re: OpenBSD porting problem [message #19302 is a reply to message #19276] |
Mon, 24 November 2008 23:06   |
masu
Messages: 378 Registered: February 2006
|
Senior Member |
|
|
The error happens in Core/plugin/z/lib/inflate.c function inflateInit2_, It returns Z_VERSION_ERROR, because stream_size is not equal to sizeof(z_stream) (64 != 56).
I don't know why, yet.
Here is the end of my debug session:
(gdb) l
82 z_streamp z;
83 int w;
84 const char *version;
85 int stream_size;
86 {
87 if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
88 stream_size != sizeof(z_stream))
89 return Z_VERSION_ERROR;
90
91 /* initialize state */
(gdb) n
89 return Z_VERSION_ERROR;
(gdb) p stream_size
$12 = 64
(gdb) p sizeof(z_stream)
$13 = 56
(gdb) bt
#0 inflateInit2_ (z=0xcfbf3ba0, w=15, version=0x3c135f60 "1.2.3",
stream_size=64) at uppsrc/plugin/z/lib/inflate.c:89
#1 0x1c312009 in sZpress (out=@0xcfbf3d20, in=@0xcfbf3d00, size=2496,
progress=
{<Upp::Moveable<Upp::Gate2<int, int>, Upp::EmptyClass>> = {<Upp::EmptyClass> = {<No data fields>}, <No data fields>}, action = 0x0}, nohdr=false,
crc=0x0, compress=false) at uppsrc/Core/z.cpp:75
#2 0x1c312495 in Upp::ZDecompress (out=@0xcfbf3d20, in=@0xcfbf3d00,
size=2496, progress=
{<Upp::Moveable<Upp::Gate2<int, int>, Upp::EmptyClass>> = {<Upp::EmptyClass> = {<No data fields>}, <No data fields>}, action = 0x7c2692b7}, nohdr=false,
crc=0x0) at uppsrc/Core/z.cpp:129
#3 0x1c31259d in Upp::ZDecompress (out=@0xcfbf3d20, in=@0xcfbf3d00, progress=
{<Upp::Moveable<Upp::Gate2<int, int>, Upp::EmptyClass>> = {<Upp::EmptyClass> = {<No data fields>}, <No data fields>}, action = 0x2e322e31})
at uppsrc/Core/z.cpp:139
#4 0x1c3127ce in Upp::ZDecompress (data=0x3c11a540, len=2496, progress=
{<Upp::Moveable<Upp::Gate2<int, int>, Upp::EmptyClass>> = {<Upp::EmptyClass> = {<No data fields>}, <No data fields>}, action = 0x7c2692b7})
at uppsrc/Core/z.cpp:154
#5 0x1c3c3043 in Upp::UnpackImlData (ptr=0x3c11a540, len=2496)
at uppsrc/Draw/ImageBlit.cpp:369
#6 0x1c3bf777 in Upp::Iml::Get (this=0x3c3f9c60, i=0)
---Type <return> to continue, or q <return> to quit---
at uppsrc/Draw/Image.cpp:433
#7 0x1c3d4eb4 in Upp::Override (target=@0x3c3f9c60, source=@0x3c3f9c60,
colored=true) at uppsrc/Draw/Cham.cpp:554
#8 0x1c3d4f7a in Upp::ColoredOverride (target=@0x3c3f9c60, source=@0x3c3f9c60)
at uppsrc/Draw/Cham.cpp:564
#9 0x1c26a636 in Upp::ChStdSkin () at uppsrc/CtrlLib/Ch.cpp:22
#10 0x1c403d48 in Upp::Ctrl::ChSync () at uppsrc/CtrlCore/Ctrl.cpp:882
#11 0x1c428a03 in Upp::Ctrl::InitX11 (display=0x0)
at uppsrc/CtrlCore/X11App.cpp:375
#12 0x1c0a95d4 in main (argc=1, argv=0xcfbf4154, envptr=0xcfbf415c)
at uppsrc/ide/idewin.cpp:672
Any ideas?
Regards,
Matthias
|
|
|
Re: OpenBSD porting problem [message #19325 is a reply to message #19302] |
Wed, 26 November 2008 15:18  |
masu
Messages: 378 Registered: February 2006
|
Senior Member |
|
|
Fixed the error.
The reason was that the system Zlib header was included for Core/z.cpp Compilation, but in the end the Zlib from plugins/z/lib where linked to the program. And then the versions did not match which resulte in that error.
So I disabled linking of z.a from plugins to the program and TheIDE now starts.
I further investigate using TheIDE and prepare an OpenBSD port.
Matthias
|
|
|
Goto Forum:
Current Time: Sat May 10 23:11:17 CEST 2025
Total time taken to generate the page: 0.02929 seconds
|