delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/09/23/01:25:04

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <20140923052427.21624.qmail@stuge.se>
Date: Tue, 23 Sep 2014 07:24:27 +0200
From: Peter Stuge <peter AT stuge DOT se>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] Banging my head against the guile-for-windows wall
Mail-Followup-To: geda-user AT delorie DOT com
References: <20140923045453 DOT 56dc3de2 AT akka>
MIME-Version: 1.0
In-Reply-To: <20140923045453.56dc3de2@akka>
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--qSHHer9gQ0dtepKr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Kai-Martin Knaak wrote:
> The road block is the dependence on guile 2.

Oh fun.

> 3) bumped the version in guile.mk :
>=20
> /----------------
> PKG             :=3D guile
> #$(PKG)_IGNORE   :=3D 2%
> $(PKG)_VERSION  :=3D 2.0.11
> $(PKG)_CHECKSUM :=3D ae86544b39048a160f4db1c0653a79b40b6c1ee6
> (...)
> define $(PKG)_BUILD
> (...)
>     '$(TARGET)-gcc' \
>         -W -Wall -disable-Werror -ansi -pedantic \
>         '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-guile.exe' \
>         `'$(TARGET)-pkg-config' guile-$(call SHORT_PKG_VERSION,$(PKG))
> --cflags --libs` \ -DGUILE_MAJOR_MINOR=3D\"$(call
> SHORT_PKG_VERSION,$(PKG))\" endef
> \----------------
>=20
> In addition I added "-disable-Werror". The original "-Werror" flag made
> the build process exit at the config stage. It complained about the
> type "long long", which allegedly is not supported in c90.

Mh, don't do this. Fix up the guile source code locally instead.


> With this flag warnings are ignored and the build declares success.

But who knows what the code will do? There may be actual programming
errors in the source which the compiler identifies as warnings...


> However, I get immediate segfault if I start the resulting guile.exe with
> wine32.

My guess is that the code is broken somehow. Maybe compiler warnings
would be enough to find the problems, maybe it requires a deeper look.


> I get:
> /----------------------------
> /usr/local/src/minipack/result/bin$ wine32 guile.exe=20
> wine: Unhandled page fault on read access to 0x0000001d at address
> 0x709ca8eb (thread 0040), starting debugger... Unhandled exception: page
> fault on read access to 0x0000001d in 32-bit code (0x709ca8eb). Register
> dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
>  EIP:709ca8eb ESP:004327c0 EBP:00000015 EFLAGS:00010202(  R- --  I   - -
> - ) EAX:00c7ffc0 EBX:709c2760 ECX:00000004 EDX:00000000
>  ESI:00000000 EDI:00000000
> (...)
> 00000022 (D) Z:\usr\local\src\minipack\result\bin\guile.exe
> 	00000033    0
> 	00000032    0
> 	00000021    0
> 	0000002e    0 <=3D=3D
> \------------------------------

So the stack has been overwritten with zeros. The actual error is
likely somewhere earlier, before the current stack frame, and this
error state doesn't really tell much.


> I am lost here. How would I debug this? Any lead? Would gdb be an option?

You're asking about debugging Windows binaries using WINE on the
geda-user list. Even if WINE can actually be used for debugging
I don't think you'll get very good replies here. :)

I would say that the way to debug Windows binaries is to use the MSVC
debugger. You would need an actual Windows system (either VM or PM)
with an appropriately high MSDN-level of Visual Studio installed to
get the debugger you need. I don't even know exactly what you need.

I don't know if gdb supports Windows.


> What would be the most likely culprit?

Impossible to say.


I would work with the source code instead. First fix all warnings
found by the compiler. Maybe also enable additional warnings and fix
those. If the shell still crashes, debug by sprinkling
printf("messages"); fflush(stdout);
all over the code, to find where the crash happens.


> PPS: The main text of this post went to the MXE list, too. Maybe some of
> the devs there points me to the right direction.

I think that's a better place to ask than geda-user, but a WINE list
and/or a guile list would probably be much better still.

Or just plow on with the source code. I guess that you will have
learned a lot more about the problem that way before you get any
concrete advice from any list.


Kind regards

//Peter

--qSHHer9gQ0dtepKr
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iD8DBQFUIQQLhR3Q0dhIfEgRAijAAJsGM+aSdm3VWmgFbIjX+YsQ+Zu6hwCgjb7U
HX0Zqeom9/OUziDy3T0hp6c=
=6pSG
-----END PGP SIGNATURE-----

--qSHHer9gQ0dtepKr--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019