You are not logged in.

#1 2019-12-04 13:03:09

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

xf86-video-sis 0.12 fails to build

xf86-video-sis has been updated to 0.12.0 , see https://lists.freedesktop.org/archives/ … 60008.html

I've tried to update it and found the fix_defines.patch is rejected, so commented it out.
Unfortunately build aborts with errors beyond my skill level.

In the past this community helped to make xf86-video-sis work,  hopefully we can do it again.


PKGBUILD

# Maintainer: Lone_Wolf <lonewolf@xs4all.nl>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Porting this to xorg-server 1.20 made possible by : loqs, progandy, regid
# see https://bbs.archlinux.org/viewtopic.php?id=237632

pkgname=xf86-video-sis
pkgver=0.12.0
pkgrel=1
pkgdesc="X.org SiS video driver"
arch=('i686' 'x86_64')
url="https://xorg.freedesktop.org/"
license=('custom')
depends=('glibc')
makedepends=('xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=24.0' 'xorgproto'  'pixman')
conflicts=('xorg-server<1.20' 'X-ABI-VIDEODRV_VERSION<24' 'X-ABI-VIDEODRV_VERSION>=25')
optdepends=('sis-dri: DRI1 support from community repo')
groups=('xorg-drivers')
# _commit=a50b2b3412dd8e7f3916acb142c942e85ffcb3e5
validpgpkeys=('CDA92E38A7A7A82237E9AB61C922784178BFFDB0')
# The above is the fingerprint for key-id C922784178BFFDB0
# That key has been verified to belong to Kevin Brace, xorg developer
source=(https://x.org/archive/individual/driver/$pkgname-$pkgver.tar.bz2{,.sig}
                'fix_defines.patch::https://ptpb.pw/2MVt')
md5sums=('b8ec9c21758043b1480f11baec296f5d'
         'SKIP'
         'd607e1ae3d9cc52096769eb55209ebab')
sha512sums=('5aa101e5217f15667f2c94f7a76f4afcf47717b61f5d206ce65efe35dc3f674ca294f98ca8586971c6467f31decdd94d8255ebfc7dc220fac0179afc61995952'
            'SKIP'
            'a3f2653f5937d300afdd8d12e4c73bc0447321c426f30dd0d47171bdc640b5996712342d21a63965ad3a280e89e9d46da2fe807eebaef61665710a6a276aa31e')

# source=("git+https://anongit.freedesktop.org/git/xorg/driver/xf86-video-sis.git#commit=$_commit"
#        'fix_defines.patch::https://ptpb.pw/2MVt')
#sha256sums=(
#            '8338641b519c25d9a8387608ea562970b4313e7602f890ff0331a0742c3f7f8b')

# pkgver() {
#   cd ${pkgname}
#  git describe --long | sed 's/^xf86-video-sis.//;s/\([^-]*-g\)/r\1/;s/-/./g'
# }

prepare() {
    cd $pkgname-$pkgver
    # patch -Np1 -i ../fix_defines.patch
    autoreconf -vfi
}

build() {
    cd $pkgname-$pkgver
    export CFLAGS=${CFLAGS/-fno-plt}
    export CXXFLAGS=${CXXFLAGS/-fno-plt}
    export LDFLAGS=${LDFLAGS/,-z,now}
    ./configure --prefix=/usr
    make
}

package() {
    cd $pkgname-$pkgver
    make DESTDIR="$pkgdir" install

    install -Dt  "$pkgdir"/usr/share/licenses/$pkgname "$srcdir"/$pkgname-$pkgver/COPYING
}

Build log

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether __clang__ is declared... no
checking whether __INTEL_COMPILER is declared... no
checking whether __SUNPRO_C is declared... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a sed that does not truncate output... /usr/bin/sed
checking if gcc supports -Werror=unknown-warning-option... no
checking if gcc supports -Werror=unused-command-line-argument... no
checking if gcc supports -Wall... yes
checking if gcc supports -Wpointer-arith... yes
checking if gcc supports -Wmissing-declarations... yes
checking if gcc supports -Wformat=2... yes
checking if gcc supports -Wstrict-prototypes... yes
checking if gcc supports -Wmissing-prototypes... yes
checking if gcc supports -Wnested-externs... yes
checking if gcc supports -Wbad-function-cast... yes
checking if gcc supports -Wold-style-definition... yes
checking if gcc supports -Wdeclaration-after-statement... yes
checking if gcc supports -Wunused... yes
checking if gcc supports -Wuninitialized... yes
checking if gcc supports -Wshadow... yes
checking if gcc supports -Wmissing-noreturn... yes
checking if gcc supports -Wmissing-format-attribute... yes
checking if gcc supports -Wredundant-decls... yes
checking if gcc supports -Wlogical-op... yes
checking if gcc supports -Werror=implicit... yes
checking if gcc supports -Werror=nonnull... yes
checking if gcc supports -Werror=init-self... yes
checking if gcc supports -Werror=main... yes
checking if gcc supports -Werror=missing-braces... yes
checking if gcc supports -Werror=sequence-point... yes
checking if gcc supports -Werror=return-type... yes
checking if gcc supports -Werror=trigraphs... yes
checking if gcc supports -Werror=array-bounds... yes
checking if gcc supports -Werror=write-strings... yes
checking if gcc supports -Werror=address... yes
checking if gcc supports -Werror=int-to-pointer-cast... yes
checking if gcc supports -Werror=pointer-to-int-cast... yes
checking if gcc supports -pedantic... yes
checking if gcc supports -Werror... yes
checking if gcc supports -Werror=attributes... yes
checking whether make supports nested variables... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking if XINERAMA is defined... yes
checking if RANDR is defined... yes
checking if RENDER is defined... yes
checking if XV is defined... yes
checking if DPMSExtension is defined... yes
checking for XORG... yes
checking for XEXT... yes
checking for /usr/include/xorg/dri.h... yes
checking for /usr/include/xorg/sarea.h... yes
checking for /usr/include/xorg/dristruct.h... yes
checking whether to include DRI support... yes
checking for DRI... yes
checking xaa.h usability... no
checking xaa.h presence... no
checking for xaa.h... no
checking whether to include XAA support... no
checking whether XSERVER_LIBPCIACCESS is declared... yes
checking for PCIACCESS... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
make  all-recursive
make[1]: Entering directory '/home/panoramix/Documents/Aur/pkgbuilds/xf86-video-sis/src/xf86-video-sis-0.12.0'
Making all in src
make[2]: Entering directory '/home/panoramix/Documents/Aur/pkgbuilds/xf86-video-sis/src/xf86-video-sis-0.12.0/src'
  CC       sis310_accel.lo
  CC       init.lo
  CC       sis_accel.lo
  CC       sis6326_video.lo
  CC       init301.lo
  CC       initextx.lo
  CC       sis300_accel.lo
  CC       sis_cursor.lo
  CC       sis_dac.lo
  CC       sis_driver.lo
  CC       sis_dga.lo
  CC       sis_opt.lo
  CC       sis_memcpy.lo
  CC       sis_shadow.lo
  CC       sis_utility.lo
  CC       sis_setup.lo
  CC       sis_vb.lo
  CC       sis_vga.lo
  CC       sis_dri.lo
  CC       sis_video.lo
initextx.c: In function ‘SiSBuildBuiltInModeList’:
initextx.c:255:22: warning: passing argument 1 of ‘sprintf’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  255 |       sprintf(current->name, "%hu%hu", pSiS->SiS_Pr->SiS_RefIndex[i].XRes,
      |               ~~~~~~~^~~~~~
In file included from /usr/include/features.h:450,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from sis.h:36,
                 from initextx.h:38,
                 from initextx.c:36:
/usr/include/bits/stdio2.h:34:1: note: expected ‘char * restrict’ but argument is of type ‘const char *’
   34 | __NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
      | ^~~~~
initextx.c:405:19: warning: passing argument 1 of ‘strcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  405 |     strcpy(current->name, SiS_PlasmaMode[l].name);
      |            ~~~~~~~^~~~~~
In file included from /usr/include/features.h:450,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from sis.h:36,
                 from initextx.h:38,
                 from initextx.c:36:
/usr/include/bits/string_fortified.h:88:1: note: expected ‘char * restrict’ but argument is of type ‘const char *’
   88 | __NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
      | ^~~~~
initextx.c:488:21: warning: passing argument 1 of ‘sprintf’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  488 |      sprintf(current->name, "%dx%d", pSiS->SiS_Pr->CP_HDisplay[i],
      |              ~~~~~~~^~~~~~
In file included from /usr/include/features.h:450,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from sis.h:36,
                 from initextx.h:38,
                 from initextx.c:36:
/usr/include/bits/stdio2.h:34:1: note: expected ‘char * restrict’ but argument is of type ‘const char *’
   34 | __NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
      | ^~~~~
In file included from /usr/include/string.h:494,
                 from sis.h:37,
                 from sis_utility.c:36:
In function ‘strncpy’,
    inlined from ‘sisutil_prepare_string’ at sis_utility.c:860:7:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sis_utility.c: In function ‘sisutil_prepare_string’:
sis_utility.c:858:14: note: length computed here
  858 |       slen = strlen(mystring);
      |              ^~~~~~~~~~~~~~~~
sis_vga.c: In function ‘SiSVGAMapMem’:
sis_vga.c:1718:25: error: #if with no expression
 1718 | #if XSERVER_LIBPCIACCESS
      |                         ^
sis_vga.c:1722:24: warning: implicit declaration of function ‘xf86MapDomainMemory’ [-Wimplicit-function-declaration]
 1722 |     pSiS->VGAMemBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO_32BIT,
      |                        ^~~~~~~~~~~~~~~~~~~
sis_vga.c:1722:62: error: ‘VIDMEM_MMIO_32BIT’ undeclared (first use in this function)
 1722 |     pSiS->VGAMemBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO_32BIT,
      |                                                              ^~~~~~~~~~~~~~~~~
sis_vga.c:1722:62: note: each undeclared identifier is reported only once for each function it appears in
sis_vga.c:1723:8: error: ‘struct <anonymous>’ has no member named ‘PciTag’
 1723 |    pSiS->PciTag, pSiS->VGAMapPhys, pSiS->VGAMapSize);
      |        ^~
sis_vga.c: In function ‘SiSVGAUnmapMem’:
sis_vga.c:1740:25: error: #if with no expression
 1740 | #if XSERVER_LIBPCIACCESS
      |                         ^
sis_vga.c:1743:5: warning: implicit declaration of function ‘xf86UnMapVidMem’ [-Wimplicit-function-declaration]
 1743 |     xf86UnMapVidMem(pScrn->scrnIndex, pSiS->VGAMemBase, pSiS->VGAMapSize);
      |     ^~~~~~~~~~~~~~~
make[2]: *** [Makefile:536: sis_vga.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
sis_driver.c: In function ‘SISPreInit’:
sis_driver.c:4169:25: error: #if with no expression
 4169 | #if XSERVER_LIBPCIACCESS
      |                         ^
sis_driver.c:4179:3: warning: implicit declaration of function ‘xf86ReadPciBIOS’ [-Wimplicit-function-declaration]
 4179 |   xf86ReadPciBIOS(0, pSiS->PciTag, 0, pSiS->BIOS, biossize);
      |   ^~~~~~~~~~~~~~~
sis_driver.c:4179:26: error: ‘struct <anonymous>’ has no member named ‘PciTag’
 4179 |   xf86ReadPciBIOS(0, pSiS->PciTag, 0, pSiS->BIOS, biossize);
      |                          ^~
sis_driver.c:4192:9: warning: implicit declaration of function ‘xf86ReadDomainMemory’ [-Wimplicit-function-declaration]
 4192 |      if(xf86ReadDomainMemory(pSiS->PciTag, segstart, biossize, pSiS->BIOS) != biossize) continue;
      |         ^~~~~~~~~~~~~~~~~~~~
sis_driver.c:4192:34: error: ‘struct <anonymous>’ has no member named ‘PciTag’
 4192 |      if(xf86ReadDomainMemory(pSiS->PciTag, segstart, biossize, pSiS->BIOS) != biossize) continue;
      |                                  ^~
sis_driver.c:6094:18: warning: passing argument 1 of ‘strcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 6094 |       strcpy(newm->name, tempm->name);
      |              ~~~~^~~~~~
In file included from /usr/include/features.h:450,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from sis.h:36,
                 from sis_driver.c:50:
/usr/include/bits/string_fortified.h:88:1: note: expected ‘char * restrict’ but argument is of type ‘const char *’
   88 | __NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
      | ^~~~~
make[2]: *** [Makefile:536: sis_driver.lo] Error 1
make[2]: Leaving directory '/home/panoramix/Documents/Aur/pkgbuilds/xf86-video-sis/src/xf86-video-sis-0.12.0/src'
make[1]: *** [Makefile:443: all-recursive] Error 1
make[1]: Leaving directory '/home/panoramix/Documents/Aur/pkgbuilds/xf86-video-sis/src/xf86-video-sis-0.12.0'
make: *** [Makefile:375: all] Error 2
[1m[31m==> ERROR:(B[m[1m A failure occurred in build().(B[m
[1m    Aborting...(B[m
[1m[32m==>(B[m[1m Removing installed dependencies...(B[m
checking dependencies...

Package (2)        Old Version  Net Change

xorg-server-devel  1.20.6-1      -1.21 MiB
xorg-util-macros   1.19.2-1      -0.12 MiB

Total Removed Size:  1.33 MiB

:: Do you want to remove these packages? [Y/n] :: Processing package changes...
removing xorg-server-devel...
removing xorg-util-macros...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#2 2019-12-04 13:28:30

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: xf86-video-sis 0.12 fails to build

updated fix_defines.patch

diff --git a/src/sis_driver.c b/src/sis_driver.c
index 51c9660..b1490d3 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -4166,7 +4166,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 			      biossize = 0x8000;
 			      break;
 	     }
-#if XSERVER_LIBPCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
 	     if(readpci) {
 		pSiS->PciInfo->rom_size = biossize;
 		pci_device_read_rom(pSiS->PciInfo, pSiS->BIOS);
diff --git a/src/sis_vga.c b/src/sis_vga.c
index 8b625d2..cf39d0c 100644
--- a/src/sis_vga.c
+++ b/src/sis_vga.c
@@ -1715,7 +1715,7 @@ SiSVGAMapMem(ScrnInfoPtr pScrn)
     if(pSiS->VGAMapPhys == 0) pSiS->VGAMapPhys = 0xA0000;
 
 #if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0)
-#if XSERVER_LIBPCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
     (void) pci_device_map_legacy(pSiS->PciInfo, pSiS->VGAMapPhys, pSiS->VGAMapSize,
                                  PCI_DEV_MAP_FLAG_WRITABLE, &pSiS->VGAMemBase);
 #else
@@ -1737,7 +1737,7 @@ SiSVGAUnmapMem(ScrnInfoPtr pScrn)
 
     if(pSiS->VGAMemBase == NULL) return;
 
-#if XSERVER_LIBPCIACCESS
+#ifdef XSERVER_LIBPCIACCESS
     (void) pci_device_unmap_legacy(pSiS->PciInfo, pSiS->VGAMemBase, pSiS->VGAMapSize);
 #else
     xf86UnMapVidMem(pScrn->scrnIndex, pSiS->VGAMemBase, pSiS->VGAMapSize);

Offline

#3 2019-12-05 15:05:35

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: xf86-video-sis 0.12 fails to build

Build works fine now, uploaded new version to AUR

Thank you, loqs .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB