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

Bug 606154

Summary: sys-apps/v86d-0.1.10 : /.../uvesafb.h:134:2: error: unknown type name ‘atomic_t’
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED WONTFIX    
Severity: normal CC: john.blbec, rene.rheaume, treecleaner, xaviermiller
Priority: Normal Keywords: PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=659186
Whiteboard: Pending removal: 2017-08-14
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
sys-apps:v86d-0.1.10:20170118-031719.log
v86d-0.1.10-atomict.patch
Ebuild with fixed atomic_t problem
undefined references after atomic_t problem fix
patch to fix duplicate definition of struct vbe_mode_ib

Description Toralf Förster gentoo-dev 2017-01-18 08:58:55 UTC
In file included from v86.h:22:0,
                 from v86_x86emu.c:4:
/usr/src/linux/include/video/uvesafb.h:134:2: error: unknown type name ‘atomic_t’
  atomic_t ref_count;
  ^
/usr/src/linux/include/video/uvesafb.h:111:12: warning: ‘uvesafb_exec’ declared ‘static’ but never defined [-Wunused-function]

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

  This is an unstable amd64 chroot image (named 13.0-unstable_20170109-235418) at a hardened host acting as a tinderbox.

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-5.4.0 *
llvm-config --version:
3.9.1

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python3.5 (fallback)
  [3]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby21 (with Rubygems) *
java-config:

  -----------------------------------------------------------------
Comment 1 Toralf Förster gentoo-dev 2017-01-18 08:58:58 UTC
Created attachment 460510 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-01-18 08:59:01 UTC
Created attachment 460512 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2017-01-18 08:59:04 UTC
Created attachment 460514 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2017-01-18 08:59:07 UTC
Created attachment 460516 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2017-01-18 08:59:10 UTC
Created attachment 460518 [details]
sys-apps:v86d-0.1.10:20170118-031719.log
Comment 6 Marco Genasci 2017-01-28 18:23:53 UTC
Workaround
# emerge -C klibc
# echo "=dev-libs/klibc-2.0.4" >> /etc/portage/package.accept_keywords
# echo "=dev-libs/klibc-2.0.4-r2" >> /etc/portage/package.mask
# emerge -1 =dev-libs/klibc-2.0.4 v86d
Comment 7 Xavier Miller (RETIRED) gentoo-dev 2017-02-02 09:28:27 UTC
The workaround does'nt work with GCC 5 (see bug #556142)
Comment 8 Pacho Ramos gentoo-dev 2017-02-04 18:25:12 UTC
v86d is dead for ages, maybe we should treeclean if nobody tries to revive it :/
Comment 9 René Rhéaume 2017-02-04 21:27:10 UTC
Created attachment 462460 [details, diff]
v86d-0.1.10-atomict.patch

I was able to build v86d after I added a typedef for atomic_t, based on what I found on https://www.mjmwired.net/kernel/Documentation/atomic_ops.txt . However, when trying to get back the page reference, I stumbled on LXR pages stating it is defined in linux/types.h .

I also needed to filter-flag -static-libgcc in the ebuild
Comment 10 René Rhéaume 2017-02-04 22:05:12 UTC
(In reply to René Rhéaume from comment #9)
> However, when trying to get back the page reference, I stumbled on LXR pages
> stating it is defined in linux/types.h .
This was defined for old versions of Linux headers. atomic_t is not found in current headers.
Comment 11 Alexey Min 2017-02-09 06:21:21 UTC
(In reply to René Rhéaume from comment #10)
> This was defined for old versions of Linux headers. atomic_t is not found in
> current headers.

Thanks! Your patch helped, and uvesafb is working now.
Comment 12 Xavier Miller (RETIRED) gentoo-dev 2017-02-24 22:38:36 UTC
Hi!

The patch is working against kernel 4.10 (and nvidia geforce 210)
Comment 13 Matthew Schultz 2017-04-10 20:26:59 UTC
(In reply to Pacho Ramos from comment #8)
> v86d is dead for ages, maybe we should treeclean if nobody tries to revive
> it :/

What other option would there be to get a large resolution framebuffer console using nvidia's binary drivers?
Comment 14 darin hensley 2017-05-04 06:30:09 UTC
v86 is not dead! I am still forced to use it with my Nvidia card. Can this patch be put into mainstream so I don't have to manually mess with it?
Comment 15 Nikita Zlobin 2017-05-30 23:46:06 UTC
(In reply to René Rhéaume from comment #10)
> (In reply to René Rhéaume from comment #9)
> > However, when trying to get back the page reference, I stumbled on LXR pages
> > stating it is defined in linux/types.h .
> This was defined for old versions of Linux headers. atomic_t is not found in
> current headers.

If this still make sence... atomic_t is defined in private version:
/usr/src/linux/include/linux/types.h

These two files seem to be same:
/usr/src/linux/include/uapi/linux/types.h
/usr/include/linux/types.h
Comment 16 Nikita Zlobin 2017-05-31 12:16:45 UTC
Created attachment 474744 [details, diff]
Ebuild with fixed atomic_t problem
Comment 17 Nikita Zlobin 2017-05-31 12:17:59 UTC
Created attachment 474746 [details]
undefined references after atomic_t problem fix
Comment 18 Nikita Zlobin 2017-05-31 12:19:50 UTC
Problem about atomic_t is fixed by couple if cflags, affecting include order.
But it still fails due to numerous undefined references.
Comment 19 Plero H 2017-07-17 22:55:02 UTC
Created attachment 485364 [details, diff]
patch to fix duplicate definition of struct vbe_mode_ib

I managed to fix build errors and using the same ebuild that is in portage by adding also the testvbe.patch.

In file included from testvbe.c:10:0:
testvbe.h:14:8: error: redefinition of ‘struct vbe_mode_ib’
 struct vbe_mode_ib {
        ^
In file included from v86.h:24:0,
                 from testvbe.c:9:
/usr/src/linux/include/video/uvesafb.h:31:8: note: originally defined here
 struct vbe_mode_ib {
        ^
testvbe.c: In function ‘main’
Comment 20 Tamas Jantvik 2017-07-18 06:54:08 UTC
I managed to build by only using v86d-0.1.10-atomict.patch, and using
EGIT_REPO_URI="git://github.com/mjanusz/v86d.git"
as source.
Ebuild at https://github.com/tsjk/gentoo-ebuilds/tree/master/sys-apps/v86d.
Just make sure your klibc installation is fine. Mine had its links to the kernel source tree (in /usr/lib64/klibc/include) replaced with empty dirs.
I know this is being taken out of the tree, but I still have an old laptop which has an uvesafb configuration, so I'm keeping this for a while.
Comment 21 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-08-14 08:05:15 UTC
commit 30c31bfe86f048a443baa523e9f487c38d950f24
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Mon Aug 14 09:56:21 2017
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Mon Aug 14 10:02:53 2017

    sys-apps/v86d: Remove last-rited pkg, #606154

 profiles/arch/amd64/package.use.force |  4 ---
 profiles/package.mask                 |  5 ----
 sys-apps/v86d/Manifest                |  1 -
 sys-apps/v86d/metadata.xml            |  8 -----
 sys-apps/v86d/v86d-0.1.10.ebuild      | 56 -----------------------------------
 5 files changed, 74 deletions(-)