9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Linking error while porting
@ 2024-05-08 11:20 sirjofri
  2024-05-08 14:22 ` qwx
  0 siblings, 1 reply; 4+ messages in thread
From: sirjofri @ 2024-05-08 11:20 UTC (permalink / raw)
  To: 9front

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-08 21:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-08 11:20 [9front] Linking error while porting sirjofri
2024-05-08 14:22 ` qwx
2024-05-08 21:10   ` sirjofri
2024-05-08 21:40     ` sirjofri

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).