9front - general discussion about 9front
 help / color / mirror / Atom feed
From: sirjofri <sirjofri+ml-9front@sirjofri.de>
To: 9front@9front.org
Subject: [9front] Linking error while porting
Date: Wed, 8 May 2024 13:20:07 +0200 (GMT+02:00)	[thread overview]
Message-ID: <d173af93-db09-4c20-ae3d-548ea39ae9eb@sirjofri.de> (raw)

Hey all,

I'm trying to port the simon tatham portable puzzle collection using npe and I get incompatible type signatures while linking the files.

For npe, I had to #undef PI after #including <libc.h> (in npe.h), because puzzles #defines its own PI. Other than that, I didn't change the source repo or npe.

My sources are here: http://sirjofri.de/oat/tmp/puzzles/

repo.url contains the url to the source repo for puzzles. To get started, clone that url to your local filesystem and copy the remaining files into the same directory.

The other files are an mkfile and plan9.c (for the plan 9 frontend, which is mostly a stub I still have to fill).

b.rc is a short build script for building the blackbox program. Literally `mk install 6.blackbox`. It's not about that program specifically, it's just the first game in the list.

The linking errors are all roughly the same, like:

new_window: incompatible type signatures 71a60b79(blackbox.6) and 846c216a(plan9.6) for thegame

In this specific case, I double checked the type and the only difference is that one is declared as the struct itself, the other as the typedef'd struct (struct game vs game). I also changed that temporarily, without a difference. The compiler handles typedef's like it should.

I can't imagine any other reason why it shouldn't work. Thanks to npe, it's the same compiler (6c) for both source files. The compilers/linkers should be up to date (sysupdated yesterday).

If anyone has any idea what could be wrong, that would be very helpful. Also if I should give you more data, just let me know.

sirjofri

             reply	other threads:[~2024-05-08 11:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08 11:20 sirjofri [this message]
2024-05-08 14:22 ` qwx
2024-05-08 21:10   ` sirjofri
2024-05-08 21:40     ` sirjofri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d173af93-db09-4c20-ae3d-548ea39ae9eb@sirjofri.de \
    --to=sirjofri+ml-9front@sirjofri.de \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).