Control: tag -1 patch

[ CCing debian-arm list to loop them into the porting issue. ]

Hi!

On Fri, 2024-06-07 at 14:42:18 +0200, Guillem Jover wrote:
> On Sat, 2024-04-20 at 14:56:40 +0200, Lucas Nussbaum wrote:
> > Source: libx86emu
> > Version: 3.5-1
> > Severity: serious
> > Justification: FTBFS
> > Tags: trixie sid ftbfs
> > User: lu...@debian.org
> > Usertags: ftbfs-20240420 ftbfs-trixie ftbfs-t64-armhf
> 
> > During a rebuild of all packages in sid, your package failed to build
> > on armhf.

> > Relevant part (hopefully):
> > > cc -g -O2 -Werror=implicit-function-declaration 
> > > -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong 
> > > -fstack-clash-protection -Wformat -Werror=format-security -g -O2 -fPIC 
> > > -fvisibility=hidden -fomit-frame-pointer -Wall -D_LARGEFILE_SOURCE 
> > > -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 
> > > -Wl,-z,relro -Wl,-z,now -c ops.c
> > > mem.c: In function ‘vm_i_byte’:
> > > mem.c:581:12: error: implicit declaration of function ‘inb’; did you mean 
> > > ‘ins’? [-Werror=implicit-function-declaration]
> > >   581 |     return inb(addr);
> > >       |            ^~~
> > >       |            ins
> > > mem.c: In function ‘vm_i_word’:
> > > mem.c:619:10: error: implicit declaration of function ‘inw’; did you mean 
> > > ‘ins’? [-Werror=implicit-function-declaration]
> > >   619 |   return inw(addr);
> > >       |          ^~~
> > >       |          ins
> > > mem.c: In function ‘vm_i_dword’:
> > > mem.c:657:10: error: implicit declaration of function ‘inl’; did you mean 
> > > ‘ins’? [-Werror=implicit-function-declaration]
> > >   657 |   return inl(addr);
> > >       |          ^~~
> > >       |          ins
> > > mem.c: In function ‘vm_o_byte’:
> > > mem.c:676:5: error: implicit declaration of function ‘outb’; did you mean 
> > > ‘outs’? [-Werror=implicit-function-declaration]
> > >   676 |     outb(val, addr);
> > >       |     ^~~~
> > >       |     outs
> > > mem.c: In function ‘vm_o_word’:
> > > mem.c:711:3: error: implicit declaration of function ‘outw’; did you mean 
> > > ‘outs’? [-Werror=implicit-function-declaration]
> > >   711 |   outw(val, addr);
> > >       |   ^~~~
> > >       |   outs
> > > mem.c: In function ‘vm_o_dword’:
> > > mem.c:748:3: error: implicit declaration of function ‘outl’; did you mean 
> > > ‘outs’? [-Werror=implicit-function-declaration]
> > >   748 |   outl(val, addr);
> > >       |   ^~~~
> > >       |   outs
> > > cc1: some warnings being treated as errors
> > > make[1]: *** [Makefile:22: mem.o] Error 1
> 
> I had a look at this, and it seems like this package has never really
> worked on ARM systems at all? And this was hidden due to the missing
> declarations not being an error.
> 
> AFAIK, only x86 (i386 and amd64), ia64 and alpha have port I/O, other
> systems have instead memory mapped I/O, but the code in mem.c is
> unconditionally calling port I/O functions such as in*() and out*(),
> provided by glibc.
> 
> Until the upstream code is ported to systems with memory mapper I/O, I
> think the "best" way to resolve this would be to restrict the
> architecture list to:
> 
>   any-amd64 any-i386 alpha ia64

The attached patch implements this. It should not affect reverse build
depending packages (only hwinfo) which is already arch restricted to
«amd64 i386».

I'm including the arm list to confirm the above, but also in case
someone there feels like porting the library to support memory mapped
I/O? (But perhaps that's not worth the effort.)

Thanks,
Guillem
From bafb0ddee8942c60b17745547854b3ed53ca4545 Mon Sep 17 00:00:00 2001
From: Guillem Jover <gjo...@sipwise.com>
Date: Tue, 11 Jun 2024 13:30:40 +0200
Subject: [PATCH] Do not build on ARM architectures where there is no port I/O

Only x86 (i386 and amd64), ia64 and alpha have port I/O, other systems
have instead memory mapped I/O, but the code in mem.c is unconditionally
calling port I/O functions such as in*() and out*(), provided by glibc.

Until the upstream code is ported to systems with memory mapped I/O, the
best way forward is to restrict to systems that are supported right now.

(The only current package build depending on libx86emu-dev is already
arch restricted to amd64 and i386.)
---
 debian/control | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index f10e3e2..e8c974b 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Homepage: https://github.com/wfeldt/libx86emu
 Rules-Requires-Root: no
 
 Package: libx86emu3
-Architecture: any-amd64 any-i386 alpha armel armhf ia64
+Architecture: any-amd64 any-i386 alpha ia64
 Multi-Arch: same
 Depends: ${misc:Depends}, ${shlibs:Depends}
 Pre-Depends: ${misc:Pre-Depends}
@@ -23,7 +23,7 @@ Description: x86 emulation library
  This package contains the library.
 
 Package: libx86emu-dev
-Architecture: any-amd64 any-i386 alpha armel armhf ia64
+Architecture: any-amd64 any-i386 alpha ia64
 Multi-Arch: same
 Section: libdevel
 Depends: libx86emu3 (= ${binary:Version}), ${misc:Depends}
-- 
2.45.1

Reply via email to