9front - general discussion about 9front
 help / color / mirror / Atom feed
From: sirjofri <sirjofri+ml-9front@sirjofri.de>
To: 9front@9front.org
Subject: Re: [9front] Linking error while porting
Date: Wed, 8 May 2024 23:10:17 +0200 (GMT+02:00)	[thread overview]
Message-ID: <a966a23d-d658-416d-99fe-5044d5ad3a90@sirjofri.de> (raw)
In-Reply-To: <94909FDAB9454C00B8D7ECE0602C3978@wopr.sciops.net>

Hi,

08.05.2024 16:24:34 qwx@sciops.net:
> From what I saw, some of these structs are actually not defined in the
> header but in individual c files.  Putting `#pragma incomplete' for a
> few of them in puzzles.h fixes most linking errors:
>
> #pragma incomplete midend
> #pragma incomplete drawing
> #pragma incomplete frontend
> #pragma incomplete random_state

I tried that and that fixed most errors.

> One error still remains for a big and complex struct, you might have
> to go through all type declarations and make sure whatever isn't
> defined in puzzles.h is marked incomplete.

I tried to find the culprit, and in the end I was so frustrated I started to copy stuff to a separate project to troubleshoot. I was able to build some minimum failing example, the bare minimum that fails.

In that example, I still can't understand why it fails, but see for yourself:

https://sirjofri.de/oat/tmp/linkerr

In the puzzles project, it is noticable that nullgame.6, blackbox.6 and cube.6 all have different type signatures for basically the same piece of code (using the same type from the same include file).

Not sure if that's a compiler bug, maybe.

sirjofri

  reply	other threads:[~2024-05-08 21:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08 11:20 sirjofri
2024-05-08 14:22 ` qwx
2024-05-08 21:10   ` sirjofri [this message]
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=a966a23d-d658-416d-99fe-5044d5ad3a90@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).