Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-02

Compiling on OpenBSD

7 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo Rame

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:
$000000020D8F7A4A
TApplication.HandleException Access violation
Stack trace:
$000000020D8F7A4A
[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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/37e450a9/attachment.html>

Reply by email

Mattias Gaertner
to Leonardo Rame
Show quoted text 6 lines
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.

Show quoted text 7 lines
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.

Show quoted text 14 lines
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: $000000020D8F7A4A TApplication.HandleException Access violation Stack trace: $000000020D8F7A4A [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

Reply by email

Henry Vermaak
to Leonardo Rame: Hi, I'm playing with OpenBsd 5.4 amd64 (with XFCE4) and found it has an fpc 2.6.2…
Leonardo Rame wrote 12 lines
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: $000000020D8F7A4A TApplication.HandleException Access violation Stack trace: $000000020D8F7A4A [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

Reply by email

Leonardo Rame

----- Mensaje original -----
Fecha: Thu, 27 Feb 2014 10:04:51 +0000
De: "Henry Vermaak"
Para: "Lazarus mailing list"
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: > $000000020D8F7A4A TApplication.HandleException Access violation Stack > trace: $000000020D8F7A4A [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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140227/44e32eb7/attachment.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb.log
Type: text/x-log
Size: 1421 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140227/44e32eb7/attachment.bin>

Reply by email

Marco van de Voort
to Mattias Gaertner: On Wed, 26 Feb 2014 22:16:01 -0300 Thanks for the hint. I added that. Lazarus sources…
Mattias Gaertner wrote 9 lines
> > /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.

Reply by email

Mattias Gaertner
to Leonardo Rame: ----- Mensaje original ----- Fecha: Thu, 27 Feb 2014 10:04:51 +0000 De: "Henry…
#7 0x0000000000b038ce 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

Reply by email

Leonardo M. Ramé
to Mattias Gaertner
Mattias Gaertner wrote 19 lines
On Thu, 27 Feb 2014 08:09:42 -0300 Leonardo Rame wrote: > #7 0x0000000000b038ce 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.
0x000000020b953389 in snprintf (str=0x7f7ffffd8b38 "", 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:
$000000020CE4A389 line 43 of /usr/src/lib/libc/stdio/snprintf.c

Reply by email