Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 885763

Summary: x11-drivers/xf86-video-nouveau-1.0.17 - nv_driver.c: error: call to undeclared function wfbScreenInit; ISO C99
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1114
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1222
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 870412    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.clang.tar.bz2
etc.portage.tar.bz2
logs.tar.bz2
temp.tar.bz2
var.tmp.clang.tar.bz2
x11-drivers:xf86-video-nouveau-1.0.17:20221213-101903.log
build log
patch updated for 21.1.9

Description Toralf Förster gentoo-dev 2022-12-13 10:44:02 UTC
too long lines were shrinked:

/bin/sh ../libtool  --tag=CC   --mode=compile clang -DHAVE_CONFIG_H -I. -I..    -I/usr/include/xorg -fvisibility=hidden -I/usr/include/pixman-1   -I/usr/include/libdrm -I/usr/include/libdrm/nouveau  -I/usr/include/libdrm  -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-decla
/bin/sh ../libtool  --tag=CC   --mode=compile clang -DHAVE_CONFIG_H -I. -I..    -I/usr/include/xorg -fvisibility=hidden -I/usr/include/pixman-1   -I/usr/include/libdrm -I/usr/include/libdrm/nouveau  -I/usr/include/libdrm  -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-decla
libtool: compile:  clang -DHAVE_CONFIG_H -I. -I.. -I/usr/include/xorg -fvisibility=hidden -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/libdrm -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-declaration -Werror=implicit-int -Wall 
/bin/sh ../libtool  --tag=CC   --mode=compile clang -DHAVE_CONFIG_H -I. -I..    -I/usr/include/xorg -fvisibility=hidden -I/usr/include/pixman-1   -I/usr/include/libdrm -I/usr/include/libdrm/nouveau  -I/usr/include/libdrm  -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-decla
libtool: compile:  clang -DHAVE_CONFIG_H -I. -I.. -I/usr/include/xorg -fvisibility=hidden -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/libdrm -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-declaration -Werror=implicit-int -Wall 
libtool: compile:  clang -DHAVE_CONFIG_H -I. -I.. -I/usr/include/xorg -fvisibility=hidden -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/libdrm -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-declaration -Werror=implicit-int -Wall 
nv_driver.c:1451:9: error: call to undeclared function 'wfbScreenInit'; ISO C99
      and later do not support implicit function declarations
      [-Werror,-Wimplicit-function-declaration]

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma_systemd-j4-20221211-150005

  -------------------------------------------------------------------

CC=clang
CXX=clang++
gcc-config -l:
 [1] x86_64-pc-linux-gnu-12 *
clang/llvm (if any):
clang version 15.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
Configuration file: /etc/clang/clang.cfg
/usr/lib/llvm/15
15.0.6
Python 3.10.9
Available Rust versions:
  [1]   rust-bin-1.65.0 *
The following VMs are available for generation-2:
1)	OpenJDK 17.0.5_p8 [openjdk-17]
2)	Eclipse Temurin JDK 11.0.17_p8 [openjdk-bin-11]
*)	Eclipse Temurin JDK 17.0.5_p8 [openjdk-bin-17]
4)	Eclipse Temurin JDK 8.352_p08 [openjdk-bin-8]
5)	Eclipse Temurin JRE 8.352_p08 [openjdk-jre-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-17 
  [2]   openjdk-bin-8 
  [3]   openjdk-bin-11 
  [4]   openjdk-bin-17  system-vm
  [5]   openjdk-jre-bin-8 

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
  [1]   php8.2 *

  HEAD of ::gentoo
commit 5db9e294831c31ef205e7c58f8056e46b8ac9b6d
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue Dec 13 09:46:50 2022 +0000

    2022-12-13 09:46:49 UTC

emerge -qpvO x11-drivers/xf86-video-nouveau
[ebuild  N    ] x11-drivers/xf86-video-nouveau-1.0.17
Comment 1 Toralf Förster gentoo-dev 2022-12-13 10:44:03 UTC
Created attachment 842417 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-12-13 10:44:04 UTC
Created attachment 842419 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2022-12-13 10:44:06 UTC
Created attachment 842421 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-12-13 10:44:07 UTC
Created attachment 842423 [details]
etc.clang.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-12-13 10:44:08 UTC
Created attachment 842425 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-12-13 10:44:09 UTC
Created attachment 842427 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2022-12-13 10:44:11 UTC
Created attachment 842429 [details]
temp.tar.bz2
Comment 8 Toralf Förster gentoo-dev 2022-12-13 10:44:11 UTC
Created attachment 842431 [details]
var.tmp.clang.tar.bz2
Comment 9 Toralf Förster gentoo-dev 2022-12-13 10:44:12 UTC
Created attachment 842433 [details]
x11-drivers:xf86-video-nouveau-1.0.17:20221213-101903.log
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-14 04:21:43 UTC
This needs a fix in xorg-server.
Comment 11 Larry the Git Cow gentoo-dev 2023-07-22 17:24:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de718a87b2cedfc40155f05af6fd477b14cabcb8

commit de718a87b2cedfc40155f05af6fd477b14cabcb8
Author:     Ahmed Charles <me@ahmedcharles.com>
AuthorDate: 2023-07-20 18:53:12 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2023-07-22 17:24:19 +0000

    x11-base/xorg-server: fix xf86-video-nouveau build
    
    Closes: https://bugs.gentoo.org/885763
    Closes: https://github.com/gentoo/gentoo/pull/31985
    Signed-off-by: Ahmed Charles <me@ahmedcharles.com>
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 .../xorg-server/files/xorg-server-21.1.8-wfb.patch |  43 +++++
 x11-base/xorg-server/xorg-server-21.1.8-r2.ebuild  | 195 +++++++++++++++++++++
 2 files changed, 238 insertions(+)
Comment 12 Pascal Jäger 2023-11-06 20:02:46 UTC
Looks like the this wasn't upstreamed properly or something. Since xorg-21.1.9 this is happening again. And 21.1.9 isn't applying the wfb patch anymore. 

Build log attached.
Comment 13 Pascal Jäger 2023-11-06 20:04:22 UTC
Created attachment 874177 [details]
build log
Comment 14 Pascal Jäger 2023-11-06 20:22:19 UTC
Sorry, apparently this patch is upstreamed indeed, but it isn't fixing the error anymore. 
I compiled with gcc and clang, same result
Comment 15 Pascal Jäger 2023-11-06 20:44:24 UTC
So to sort this out properly: This is not upstreamed in tag 21.1.9 (https://gitlab.freedesktop.org/xorg/xserver/-/blob/xorg-server-21.1.9/fb/fb.h?ref_type=tags#L1030) but it is or later commits. 

Patch attached.
Comment 16 Pascal Jäger 2023-11-06 20:49:18 UTC
Created attachment 874186 [details, diff]
patch updated for 21.1.9
Comment 17 Larry the Git Cow gentoo-dev 2023-12-14 04:12:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=702ab503b10f6fe6719564dbc310bd4422f58014

commit 702ab503b10f6fe6719564dbc310bd4422f58014
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-14 02:38:35 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-14 04:03:40 +0000

    x11-base/xorg-server: fix headers for modern C issue
    
    Otherwise nouveau can't build. These changes are in master already and I've
    sent a PR to backport them too.
    
    Closes: https://bugs.gentoo.org/885763
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/xorg-server-21.1.10-c99.patch            |  39 +++++
 x11-base/xorg-server/xorg-server-21.1.10-r1.ebuild | 194 +++++++++++++++++++++
 2 files changed, 233 insertions(+)
Comment 18 Matt Turner gentoo-dev 2023-12-14 15:59:44 UTC
Having heard no users complain about this indicates to me that no one uses xf86-video-nouveau...