Re: [Lazarus] Compiling on OpenBSD
On 2014-03-03 23:00:50 +0100, Mattias Gaertner wrote: On Thu, 27 Feb 2014 08:09:42 -0300 Leonardo Rame l.r...@griensu.com wrote: #7 0x00b038ce in GETSTYLEWITHNAME ( WNAME=0x1ae7258 vertical scrollbar) at gtk2proc.inc:7815 That is StyleObject^.Widget := gtk_vscrollbar_new(nil); That means a normal gtk call fails. Probably there was some other bug happened prior to this and crumbled the heap or stack. Please compile with more checks. For example: make clean all OPT='-Criot -ghtl' Mattias Hi Mattias, I've compiled with OPT='-Criot -ghtl', here are the results if I run from gdb: Program received signal SIGBUS, Bus error. 0x00020b953389 in snprintf (str=0x7f7d8b38 , n=39, fmt=0x2021dc755 %.17g) at /usr/src/lib/libc/stdio/snprintf.c:43 43 /usr/src/lib/libc/stdio/snprintf.c: No such file or directory. in /usr/src/lib/libc/stdio/snprintf.c Current language: auto; currently c The program is running. Exit anyway? (y or n) % ➜ lazarus ./lazarus --g-fatal-warnings Here's the result of just running from the command prompt: TMainIDE.ParseCmdLineOptions: PrimaryConfigPath=/home/martin/.lazarus SecondaryConfigPath=/etc/lazarus TApplication.HandleException Access violation Stack trace: $00020CE4A389 line 43 of /usr/src/lib/libc/stdio/snprintf.c -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiling on OpenBSD
On Thu, 27 Feb 2014 08:09:42 -0300 Leonardo Rame l.r...@griensu.com wrote: #7 0x00b038ce in GETSTYLEWITHNAME ( WNAME=0x1ae7258 vertical scrollbar) at gtk2proc.inc:7815 That is StyleObject^.Widget := gtk_vscrollbar_new(nil); That means a normal gtk call fails. Probably there was some other bug happened prior to this and crumbled the heap or stack. Please compile with more checks. For example: make clean all OPT='-Criot -ghtl' Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiling on OpenBSD
On Wed, 26 Feb 2014 22:16:01 -0300 Leonardo Rame l.r...@griensu.com wrote: Hi, I'm playing with OpenBsd 5.4 amd64 (with XFCE4) and found it has an fpc 2.6.2 package, so I tried compiling Lazarus trunk. I had only a couple of issues while compiling. 1) Use gmake instead of make. This is the same as in FreeBsd, no problem. 2) Had to create the file ide/include/openbsd/lazconf.inc with the same contents of the FreeBsd version (attached). Thanks for the hint. I added that. 3) At linking lazarus there were some warnings: /usr/local/lib//libglib-2.0.so.3600.1: warning: vsprintf() is often misused, please use vsnprintf() /usr/local/lib//libglib-2.0.so.3600.1: warning: stpcpy() is dangerous GNU crap; don't use it /usr/X11R6/lib//libX11.so.15.2: warning: strcpy() is almost always misused, please use strlcpy() /usr/X11R6/lib//libX11.so.15.2: warning: strcat() is almost always misused, please use strlcat() /usr/X11R6/lib//libX11.so.15.2: warning: sprintf() is often misused, please use snprintf() Lazarus sources don't use them directly. Maybe some FPC packages use them. 4) When I've tried to run ./lazarus, I got this: (lazarus:14292): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed [FORMS.PP] ExceptionOccurred Sender=EAccessViolation Exception=Access violation Stack trace: $00020D8F7A4A TApplication.HandleException Access violation Stack trace: $00020D8F7A4A [FORMS.PP] ExceptionOccurred I think this can be related to my gtk2 version: gtk+2-2.24.20p1 Run in gdb. Hopefully it gives a better stacktrace. Well, I hope someone can take a look at the OpenBSD version, this is a really nice O.S. that deserves a Lazarus package :). Thanks for testing. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiling on OpenBSD
On Wed, Feb 26, 2014 at 10:16:01PM -0300, Leonardo Rame wrote: Hi, I'm playing with OpenBsd 5.4 amd64 (with XFCE4) and found it has an fpc 2.6.2 package, so I tried compiling Lazarus trunk. -- 8 -- 4) When I've tried to run ./lazarus, I got this: (lazarus:14292): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed [FORMS.PP] ExceptionOccurred Sender=EAccessViolation Exception=Access violation Stack trace: $00020D8F7A4A TApplication.HandleException Access violation Stack trace: $00020D8F7A4A [FORMS.PP] ExceptionOccurred If you run ./lazarus --g-fatal-warnings, it will halt on a GTK warning, so you can get a backtrace under gdb. Henry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiling on OpenBSD
- Mensaje original - Fecha:Thu, 27 Feb 2014 10:04:51 + De: Henry Vermaak henry.verm...@gmail.com Para: Lazarus mailing list lazarus@lists.lazarus.freepascal.org Asunto: Re: [Lazarus] Compiling on OpenBSD On Wed, Feb 26, 2014 at 10:16:01PM -0300, Leonardo Rame wrote: Hi, I'm playing with OpenBsd 5.4 amd64 (with XFCE4) and found it has an fpc 2.6.2 package, so I tried compiling Lazarus trunk. -- 8 -- 4) When I've tried to run ./lazarus, I got this: (lazarus:14292): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed [FORMS.PP] ExceptionOccurred Sender=EAccessViolation Exception=Access violation Stack trace: $00020D8F7A4A TApplication.HandleException Access violation Stack trace: $00020D8F7A4A [FORMS.PP] ExceptionOccurred If you run ./lazarus --g-fatal-warnings, it will halt on a GTK warning, so you can get a backtrace under gdb. Hi Henry, attached is the backtrace (gdb.log). I don't see anything obvious, maybe the problem is fpc related (I'm using 2.6.2).-- Leonardo M. Raméhttp://leonardorame.blogspot.com #0 0x000206e62a4a in g_object_new () from /usr/local/lib/libgobject-2.0.so.3600.1 #1 0x00020523f8b5 in gtk_adjustment_new () from /usr/local/lib/libgtk-x11-2.0.so.2400.0 #2 0x00020533abcf in gtk_range_set_adjustment () from /usr/local/lib/libgtk-x11-2.0.so.2400.0 #3 0x000206e649d4 in g_object_constructor () from /usr/local/lib/libgobject-2.0.so.3600.1 #4 0x000206e6230e in g_object_newv () from /usr/local/lib/libgobject-2.0.so.3600.1 #5 0x000206e62863 in g_object_new_valist () from /usr/local/lib/libgobject-2.0.so.3600.1 #6 0x000206e62aa6 in g_object_new () from /usr/local/lib/libgobject-2.0.so.3600.1 #7 0x00b038ce in GETSTYLEWITHNAME ( WNAME=0x1ae7258 vertical scrollbar) at gtk2proc.inc:7815 #8 0x00b03297 in GETSTYLE (ASTYLE=LGSVERTICALSCROLLBAR) at gtk2proc.inc:7620 #9 0x00a0cfbe in INITSYSTEMCOLORS (this=0x20b4e6630) at gtk2widgetset.inc:2449 #10 0x00a08029 in GTK2CREATE (this=0x20b4e6630) at gtk2widgetset.inc:1448 #11 0x00a05fa6 in CREATE (this=0x20b4e6630, vmt=0x1a3aa00) at gtk2widgetset.inc:974 #12 0x008615f1 in CREATEWIDGETSET (AWIDGETSETCLASS=0x1a3aa00) at forms.pp:2001 #13 0x0085fc50 in INTERFACES_init () at interfaces.pas:37 #14 0x008317be in fpc_initializeunits () #15 0x in ?? () The program is running. Exit anyway? (y or n) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Compiling on OpenBSD
On Thu, Feb 27, 2014 at 08:54:06AM +0100, Mattias Gaertner wrote: /usr/local/lib//libglib-2.0.so.3600.1: warning: vsprintf() is often misused, please use vsnprintf() /usr/local/lib//libglib-2.0.so.3600.1: warning: stpcpy() is dangerous GNU crap; don't use it /usr/X11R6/lib//libX11.so.15.2: warning: strcpy() is almost always misused, please use strlcpy() /usr/X11R6/lib//libX11.so.15.2: warning: strcat() is almost always misused, please use strlcat() /usr/X11R6/lib//libX11.so.15.2: warning: sprintf() is often misused, please use snprintf() Lazarus sources don't use them directly. Maybe some FPC packages use them. I think the named libs use them, not us. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Compiling on OpenBSD
Hi, I'm playing with OpenBsd 5.4 amd64 (with XFCE4) and found it has an fpc 2.6.2 package, so I tried compiling Lazarus trunk. I had only a couple of issues while compiling. 1) Use gmake instead of make. This is the same as in FreeBsd, no problem. 2) Had to create the file ide/include/openbsd/lazconf.inc with the same contents of the FreeBsd version (attached). 3) At linking lazarus there were some warnings: /usr/local/lib//libglib-2.0.so.3600.1: warning: vsprintf() is often misused, please use vsnprintf() /usr/local/lib//libglib-2.0.so.3600.1: warning: stpcpy() is dangerous GNU crap; don't use it /usr/X11R6/lib//libX11.so.15.2: warning: strcpy() is almost always misused, please use strlcpy() /usr/X11R6/lib//libX11.so.15.2: warning: strcat() is almost always misused, please use strlcat() /usr/X11R6/lib//libX11.so.15.2: warning: sprintf() is often misused, please use snprintf() 4) When I've tried to run ./lazarus, I got this: (lazarus:14292): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed [FORMS.PP] ExceptionOccurred Sender=EAccessViolation Exception=Access violation Stack trace: $00020D8F7A4A TApplication.HandleException Access violation Stack trace: $00020D8F7A4A [FORMS.PP] ExceptionOccurred I think this can be related to my gtk2 version: gtk+2-2.24.20p1 Well, I hope someone can take a look at the OpenBSD version, this is a really nice O.S. that deserves a Lazarus package :). Regards, -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus