Atte André Jensen | 19 Jul 18:43 2008
Picon

compiling leocad under ubuntu 7.10

Hi

I'm trying to get leocad working under ubuntu 7.10. I grabbed it from 
svn, but make fails like this, any idea what to do or which message.h 
it's missing?

atte <at> ajstrup:~/software/lego/leocad/08_07_19$ make
g++ -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include 
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
-I/usr/include/freetype2 -I/usr/include/libpng12   -O2 -Wall -Ilinux 
-Icommon -DLC_LINUX -g -include linux/config.h  -c -o linux/dialogs.o 
linux/dialogs.cpp
linux/dialogs.cpp:24:21: error: message.h: No such file or directory
common/lc_message.h:13: warning: ‘class lcListener’ has virtual 
functions but non-virtual destructor
common/project.h:62: warning: ‘class Project’ has virtual functions but 
non-virtual destructor
linux/dialogs.cpp: In function ‘int propertiesdlg_execute(void*)’:
linux/dialogs.cpp:2392: error: ‘LC_MAXCOLORS’ was not declared in this scope
linux/dialogs.cpp:2393: error: ‘totalcount’ was not declared in this scope
linux/dialogs.cpp:2394: error: ‘struct LC_PROPERTIESDLG_OPTS’ has no 
member named ‘lines’
linux/dialogs.cpp:2396: error: ‘struct LC_PROPERTIESDLG_OPTS’ has no 
member named ‘count’
linux/dialogs.cpp:2424: error: ‘col’ was not declared in this scope
linux/dialogs.cpp:2426: error: ‘colornames’ was not declared in this scope
linux/dialogs.cpp:2437: error: ‘row’ was not declared in this scope
linux/dialogs.cpp:2439: error: ‘struct LC_PROPERTIESDLG_OPTS’ has no 
member named ‘lines’
(Continue reading)

junk | 19 Jul 20:57 2008

Re: compiling leocad under ubuntu 7.10

That last revision that compiles under linux for me is 699.

On Sat, Jul 19, 2008 at 9:43 AM, Atte André Jensen
<atte.jensen@...> wrote:
> Hi
>
> I'm trying to get leocad working under ubuntu 7.10. I grabbed it from
> svn, but make fails like this, any idea what to do or which message.h
> it's missing?
>
> atte <at> ajstrup:~/software/lego/leocad/08_07_19$ make
> g++ -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
> -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/freetype2 -I/usr/include/libpng12   -O2 -Wall -Ilinux
> -Icommon -DLC_LINUX -g -include linux/config.h  -c -o linux/dialogs.o
> linux/dialogs.cpp
> linux/dialogs.cpp:24:21: error: message.h: No such file or directory
> common/lc_message.h:13: warning: 'class lcListener' has virtual
> functions but non-virtual destructor
> common/project.h:62: warning: 'class Project' has virtual functions but
> non-virtual destructor
> linux/dialogs.cpp: In function 'int propertiesdlg_execute(void*)':
> linux/dialogs.cpp:2392: error: 'LC_MAXCOLORS' was not declared in this scope
> linux/dialogs.cpp:2393: error: 'totalcount' was not declared in this scope
> linux/dialogs.cpp:2394: error: 'struct LC_PROPERTIESDLG_OPTS' has no
> member named 'lines'
> linux/dialogs.cpp:2396: error: 'struct LC_PROPERTIESDLG_OPTS' has no
> member named 'count'
> linux/dialogs.cpp:2424: error: 'col' was not declared in this scope
(Continue reading)

Atte André Jensen | 19 Jul 23:08 2008
Picon

Re: compiling leocad under ubuntu 7.10

junk@... wrote:
> That last revision that compiles under linux for me is 699.

Thanks, that compiles here too. Now it crashes with the same error as 
did http://www.leocad.org/files/leocad-0.75-1.i386.rpm (installed 
through alien):

atte <at> ajstrup:~/software/lego/leocad/leocad_r_600$ leocad
The program 'leocad' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
   (Details: serial 1254 error_code 8 request_code 143 minor_code 5)
   (Note to programmers: normally, X errors are reported asynchronously;
    that is, you will receive the error a while after causing it.
    To debug your program, run it with the --sync command line
    option to change this behavior. You can then get a meaningful
    backtrace from your debugger if you break on the gdk_x_error() 
function.)

Any idea what this is and how to get further?

--

-- 
peace, love & harmony
Atte

http://atte.dk       | http://myspace.com/attejensen
http://anagrammer.dk | http://modlys.dk
Henrik Sundberg | 20 Jul 19:31 2008
Picon

Missing piece manager in 0.75 (and compilation problems)

Hi,
I'm new to this list. And quite new to Linux as well - please bear with me...

I've succeeded in compiling the 0.75 release using gcc/g++ 4.2.4 on
Kubuntu 8.04.

* I've been able to use Leocad to create models, but nothing happens
when I try to bring up the  Files/Pieces Library Manager..., does this
functionality exist in the Linux version?

* Nothing happens when clicking Files/Pieces Library Manager...

* Clicking Open Project gives (but it works anyway):
(leocad:14202): GLib-GObject-WARNING **: invalid cast from `GtkHPaned'
to `GtkBox'
(leocad:14202): Gtk-CRITICAL **: gtk_box_pack_start: assertion
`GTK_IS_BOX (box)' failed
(leocad:14202): GLib-GObject-CRITICAL **:
g_signal_connect_closure_by_id: assertion `signal_id > 0' failed

* Does the compilation of 0.75 work for others?
  Is gcc 4.2.4 complaing more than earlier versions? Which version is
used for Leocad development?

Below is the long version of my efforts. And an svn diff is attached
(as patch.txt)

/$

$ make config
(Continue reading)

Henrik Sundberg | 20 Jul 19:43 2008
Picon

Problems compiling the trunk (gcc 4.2.4)

Hello again,

I've tried to compile the trunk (I thought of looking into the problem
I had with the piece manager in 0.75).

jpeg/zlib/png are installed, I fixed that first.

I gave up in the end (see below). Is the trunk only partly committed?

Would it take a lot to make the trunk compilable?

/$

$ make config
Automatic configuration
checking size of char... 1
checking size of short... 2
checking size of long... 4
checking size of int... 4
checking size of void *... 4
checking size of long long... 8
Determining endianess... little endian
Checking if GLIB and GTK+ are installed... ok
Checking for jpeg support... no (libjpeg optional)
Checking for zlib support... no (zlib optional)
Checking for png support... no (libpng optional)

By clearing ERROR_SETTING, I get:
$ make config
Automatic configuration
(Continue reading)

Leonardo Zide | 20 Jul 23:10 2008
Picon

Re: Problems compiling the trunk (gcc 4.2.4)

 
  Hi,
 
  Thanks for the interest on the program and the patches, I've applied them to the trunk.
 
  I usually implement new features on the Windows version first as it's the OS I use primarily nowadays but since some files are shared between all platforms I sometimes end up breaking the other versions. I've just checked in fixes to the Linux version and now I'm able to compile and run the trunk version on ubuntu 8, sorry about that.
 
  Keep in mind the trunk version is usually unstable as it often has new features (in this case multiple submodels and flexible pieces) so if you just want to compile something to use I'd recommend the last stable version instead. Unfortunately the last stable version was only tested with gcc 3 so you ended up having those compiler errors with gcc 4.
 
  I believe the Pieces Library Manager wasn't implemented for the Linux version, most functions are cross platform but I never had time to add the dialog itself. I wish I had used QT or wxWidgets instead of GTK and have the GUI code shared between all platforms so this wouldn't be an issue.

 
Leonardo
 

On Sun, Jul 20, 2008 at 10:43 AM, Henrik Sundberg <storangen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hello again,

I've tried to compile the trunk (I thought of looking into the problem
I had with the piece manager in 0.75).

jpeg/zlib/png are installed, I fixed that first.

I gave up in the end (see below). Is the trunk only partly committed?

Would it take a lot to make the trunk compilable?

/$


$ make config
Automatic configuration
checking size of char... 1
checking size of short... 2
checking size of long... 4
checking size of int... 4
checking size of void *... 4
checking size of long long... 8
Determining endianess... little endian
Checking if GLIB and GTK+ are installed... ok
Checking for jpeg support... no (libjpeg optional)
Checking for zlib support... no (zlib optional)
Checking for png support... no (libpng optional)

By clearing ERROR_SETTING, I get:
$ make config
Automatic configuration
checking size of char... 1
checking size of short... 2
checking size of long... 4
checking size of int... 4
checking size of void *... 4
checking size of long long... 8
Determining endianess... little endian
Checking if GLIB and GTK+ are installed... ok
Checking for jpeg support... no (libjpeg optional)
Checking for zlib support... no (zlib optional)
Checking for png support... no (libpng optional)
henrik <at> dellen:/usr/local/src/exp-trunk$
henrik <at> dellen:/usr/local/src/exp-trunk$ make config
Automatic configuration
checking size of char... conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in
function 'exit'
1
checking size of short... conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in
function 'exit'
2
checking size of long... conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in
function 'exit'
4
checking size of int... conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in
function 'exit'
4
checking size of void *... conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in
function 'exit'
4
checking size of long long... conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in
function 'exit'
8
Determining endianess... endiantest.c: In function 'main':
endiantest.c:2: warning: incompatible implicit declaration of built-in
function 'exit'
little endian
Checking if GLIB and GTK+ are installed... ok
Checking for jpeg support... In file included from <command-line>:0:
./linux/config.h:7:1: error: unterminated #ifndef
no (libjpeg optional)
Checking for zlib support... In file included from <command-line>:0:
./linux/config.h:7:1: error: unterminated #ifndef
no (zlib optional)
Checking for png support... In file included from <command-line>:0:
./linux/config.h:7:1: error: unterminated #ifndef
no (libpng optional)

By changing "main" to "int main" and exit to return in CONFTEST and
the endianess check, I get:
$ make config
Automatic configuration
checking size of char... 1
checking size of short... 2
checking size of long... 4
checking size of int... 4
checking size of void *... 4
checking size of long long... 8
Determining endianess... little endian
Checking if GLIB and GTK+ are installed... ok
Checking for jpeg support... In file included from <command-line>:0:
./linux/config.h:7:1: error: unterminated #ifndef
no (libjpeg optional)
Checking for zlib support... In file included from <command-line>:0:
./linux/config.h:7:1: error: unterminated #ifndef
no (zlib optional)
Checking for png support... In file included from <command-line>:0:
./linux/config.h:7:1: error: unterminated #ifndef
no (libpng optional)

The problem is that config.h isn't done yet. I worked around that by
changing Makefile to have another set of flags without the include
statement, and used those flags instead in the jpeg/zlib/png tests in
config.mk. This made make config pass.

After this I found out that I needed common/array.* and
common/message.* from the earlier release, so I added them and got:
$ make
g++ -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/pixman-1   -O2 -Wall -Ilinux -Icommon -DLC_LINUX -g
-include linux/config.h  -c -o linux/dialogs.o linux/dialogs.cpp
In file included from common/project.h:4,
                from linux/dialogs.cpp:25:
common/lc_message.h:9: error: conflicting declaration 'LC_MSG_COUNT'
common/message.h:12: error: 'LC_MSG_COUNT' has a previous declaration
as 'LC_MSG_TYPES LC_MSG_COUNT'
linux/dialogs.cpp: In function 'int propertiesdlg_execute(void*)':
linux/dialogs.cpp:2392: error: 'LC_MAXCOLORS' was not declared in this scope
linux/dialogs.cpp:2393: error: 'totalcount' was not declared in this scope
linux/dialogs.cpp:2394: error: 'struct LC_PROPERTIESDLG_OPTS' has no
member named 'lines'
linux/dialogs.cpp:2396: error: 'struct LC_PROPERTIESDLG_OPTS' has no
member named 'count'
linux/dialogs.cpp:2424: error: 'col' was not declared in this scope
linux/dialogs.cpp:2426: error: 'colornames' was not declared in this scope
linux/dialogs.cpp:2437: error: 'row' was not declared in this scope
linux/dialogs.cpp:2439: error: 'struct LC_PROPERTIESDLG_OPTS' has no
member named 'lines'
linux/dialogs.cpp:2444: error: 'struct LC_PROPERTIESDLG_OPTS' has no
member named 'count'
linux/dialogs.cpp:2449: error: 'row' was not declared in this scope
linux/dialogs.cpp:2449: error: 'struct LC_PROPERTIESDLG_OPTS' has no
member named 'names'
linux/dialogs.cpp:2454: error: 'struct LC_PROPERTIESDLG_OPTS' has no
member named 'count'
linux/dialogs.cpp:2455: error: 'col' was not declared in this scope
linux/dialogs.cpp:2455: error: 'struct LC_PROPERTIESDLG_OPTS' has no
member named 'count'
linux/dialogs.cpp:2462: error: 'row' was not declared in this scope
linux/dialogs.cpp:2468: error: 'col' was not declared in this scope
linux/dialogs.cpp: In function 'void modifydlg_create()':
linux/dialogs.cpp:3081: error: 'messenger' was not declared in this scope
make: *** [linux/dialogs.o] Error 1

At this point I gave up.

_______________________________________________
Leocad mailing list
Leocad-KBwQgg6FT4s/11+TDStg7g@public.gmane.org
https://list.gerf.org/listinfo/leocad


_______________________________________________
Leocad mailing list
Leocad@...
https://list.gerf.org/listinfo/leocad
Atte André Jensen | 21 Jul 07:20 2008
Picon

Re: Problems compiling the trunk (gcc 4.2.4)

Leonardo Zide wrote:
> now I'm able to compile and
> run the trunk version on ubuntu 8, sorry about that.

Thanks for aking svn compile on linux. Unfortunately now I get this when 
running leocad, any idea what's wrong:

atte <at> ajstrup:~/software/lego/leocad/08_07_21$ leocad
The program 'leocad' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
   (Details: serial 1254 error_code 8 request_code 143 minor_code 5)
   (Note to programmers: normally, X errors are reported asynchronously;
    that is, you will receive the error a while after causing it.
    To debug your program, run it with the --sync command line
    option to change this behavior. You can then get a meaningful
    backtrace from your debugger if you break on the gdk_x_error() 
function.)

--

-- 
peace, love & harmony
Atte

http://atte.dk       | http://myspace.com/attejensen
http://anagrammer.dk | http://modlys.dk
Raphaël Jacquot | 21 Jul 07:40 2008

Re: Problems compiling the trunk (gcc 4.2.4)

Atte André Jensen wrote:
> Leonardo Zide wrote:
>> now I'm able to compile and
>> run the trunk version on ubuntu 8, sorry about that.
> 
> Thanks for aking svn compile on linux. Unfortunately now I get this when 
> running leocad, any idea what's wrong:
> 
> atte <at> ajstrup:~/software/lego/leocad/08_07_21$ leocad
> The program 'leocad' received an X Window System error.
> This probably reflects a bug in the program.
> The error was 'BadMatch (invalid parameter attributes)'.
>    (Details: serial 1254 error_code 8 request_code 143 minor_code 5)
>    (Note to programmers: normally, X errors are reported asynchronously;
>     that is, you will receive the error a while after causing it.
>     To debug your program, run it with the --sync command line
>     option to change this behavior. You can then get a meaningful
>     backtrace from your debugger if you break on the gdk_x_error() 
> function.)
> 

you should try what the error message says ;) the debugger is called gdb ;)
_______________________________________________
Leocad mailing list
Leocad <at> list.gerf.org
https://list.gerf.org/listinfo/leocad
Atte André Jensen | 21 Jul 09:03 2008
Picon

Re: Problems compiling the trunk (gcc 4.2.4)

Raphaël Jacquot wrote:

> you should try what the error message says ;) the debugger is called gdb ;)

I'm not a programmer, I just want to play with LEGO :-)

Could you tell me what to do?

--

-- 
peace, love & harmony
Atte

http://atte.dk       | http://myspace.com/attejensen
http://anagrammer.dk | http://modlys.dk
_______________________________________________
Leocad mailing list
Leocad <at> list.gerf.org
https://list.gerf.org/listinfo/leocad
Henrik Sundberg | 21 Jul 22:01 2008
Picon

Re: Problems compiling the trunk (gcc 4.2.4)

2008/7/21 Raphaël Jacquot <sxpert@...>:
> Atte André Jensen wrote:
>> Leonardo Zide wrote:
>>> now I'm able to compile and
>>> run the trunk version on ubuntu 8, sorry about that.
>>
>> Thanks for aking svn compile on linux. Unfortunately now I get this when
>> running leocad, any idea what's wrong:
>>
>> atte <at> ajstrup:~/software/lego/leocad/08_07_21$ leocad
>> The program 'leocad' received an X Window System error.
>> This probably reflects a bug in the program.
>> The error was 'BadMatch (invalid parameter attributes)'.
>>    (Details: serial 1254 error_code 8 request_code 143 minor_code 5)
>>    (Note to programmers: normally, X errors are reported asynchronously;
>>     that is, you will receive the error a while after causing it.
>>     To debug your program, run it with the --sync command line
>>     option to change this behavior. You can then get a meaningful
>>     backtrace from your debugger if you break on the gdk_x_error()
>> function.)
>>
>
> you should try what the error message says ;) the debugger is called gdb ;)

Thanks for the new version!
I've been trying a little during the day.
Compilation works and I can add a few pieces to a new project.
Zoom and colors doesn't work.
I can't open old projects, I tried with both the lcd and ldr versions
and got slightly different crashes:
$ ./leocad /usr/local/share/ldraw/MODELS/bluer.lcd

(leocad:6592): Gdk-CRITICAL **: gdk_window_set_cursor: assertion
`GDK_IS_WINDOW (window)' failed
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted

$ ./leocad /usr/local/share/ldraw/MODELS/bluer.ldr

(leocad:6593): Gdk-CRITICAL **: gdk_window_set_cursor: assertion
`GDK_IS_WINDOW (window)' failed

(leocad:6593): Gdk-CRITICAL **: gdk_window_set_cursor: assertion
`GDK_IS_WINDOW (window)' failed

(leocad:6593): Gdk-CRITICAL **: gdk_window_set_cursor: assertion
`GDK_IS_WINDOW (window)' failed

(leocad:6593): Gdk-CRITICAL **: gdk_window_set_cursor: assertion
`GDK_IS_WINDOW (window)' failed
Segmentation fault

I haven't used linux debuggers before. What is recommended?
(I tried gdb from emacs, but have problems with seeing the source...)

/$

Gmane