Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 918124 - app-misc/ddcutil-2.0.0 - cmd_parser_goption.c: error: ignored_vid_pid undeclared (first use in this function)
Summary: app-misc/ddcutil-2.0.0 - cmd_parser_goption.c: error: ignored_vid_pid undecla...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-11-24 13:16 UTC by Toralf Förster
Modified: 2023-11-27 20:09 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,19.79 KB, text/plain)
2023-11-24 13:16 UTC, Toralf Förster
Details
app-misc:ddcutil-2.0.0:20231124-131053.log (app-misc:ddcutil-2.0.0:20231124-131053.log,120.09 KB, text/plain)
2023-11-24 13:16 UTC, Toralf Förster
Details
emerge-history.txt.xz (emerge-history.txt.xz,110.22 KB, application/x-xz)
2023-11-24 13:16 UTC, Toralf Förster
Details
environment (environment,97.62 KB, text/plain)
2023-11-24 13:16 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.08 KB, application/x-xz)
2023-11-24 13:16 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,33.38 KB, application/x-xz)
2023-11-24 13:16 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,10.41 KB, application/x-xz)
2023-11-24 13:16 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,109.58 KB, application/x-xz)
2023-11-24 13:16 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,32.19 KB, application/x-xz)
2023-11-24 13:16 UTC, Toralf Förster
Details
Work around (fix.patch,657 bytes, patch)
2023-11-24 18:29 UTC, Mike Lothian
Details | Diff
source code edit to patch the missing symbol back in (cmd_parser_goption.c.patch,653 bytes, patch)
2023-11-25 04:51 UTC, genBTC
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-11-24 13:16:30 UTC
too long lines were shrinked:

/bin/sh ../../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../..  -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I../../src -I../../src/public  -Wall -std=c11 -Werror=unused-result -Wimplicit-function-declaration -Wno-comp
/bin/sh ../../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../..  -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I../../src -I../../src/public  -Wall -std=c11 -Werror=unused-result -Wimplicit-function-declaration -Wno-comp
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I../../src -I../../src/public -Wall -std=c11 -Werror=unused-result -Wimplicit-function-declaration -Wno-compound-token-split-by-macro -fPIC 
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I../../src -I../../src/public -Wall -std=c11 -Werror=unused-result -Wimplicit-function-declaration -Wno-compound-token-split-by-macro -fPIC 
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I../../src -I../../src/public -Wall -std=c11 -Werror=unused-result -Wimplicit-function-declaration -Wno-compound-token-split-by-macro -fPIC 
cmd_parser_goption.c: In function 'parse_command':
cmd_parser_goption.c:1516:8: error: 'ignored_vid_pid' undeclared (first use in this function)
 1516 |    if (ignored_vid_pid) {
      |        ^~~~~~~~~~~~~~~

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no_multilib_hardened-20231114-170805

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

GNUMAKEFLAGS="$GNUMAKEFLAGS --shuffle"
gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 17.0.5
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/17/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/17
17.0.5
Python 3.11.6
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.73.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.20.1_p1 [openjdk-bin-11]
2)	Eclipse Temurin JDK 17.0.8.1_p1 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21]
4)	Eclipse Temurin JDK 8.382_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-11 
  [3]   openjdk-bin-17 
  [4]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
go version go1.21.4 linux/amd64

  HEAD of ::gentoo
commit c15572c8e4b25d28c9f7bb7f939f20b563764ef4
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Fri Nov 24 13:02:05 2023 +0000

    2023-11-24 13:02:04 UTC

emerge -qpvO app-misc/ddcutil
[ebuild     U ] app-misc/ddcutil-2.0.0 [1.4.1] USE="X -drm -usb-monitor -user-permissions" VIDEO_CARDS="-nvidia"
Comment 1 Toralf Förster gentoo-dev 2023-11-24 13:16:31 UTC
Created attachment 875502 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-11-24 13:16:33 UTC
Created attachment 875503 [details]
app-misc:ddcutil-2.0.0:20231124-131053.log
Comment 3 Toralf Förster gentoo-dev 2023-11-24 13:16:34 UTC
Created attachment 875504 [details]
emerge-history.txt.xz
Comment 4 Toralf Förster gentoo-dev 2023-11-24 13:16:35 UTC
Created attachment 875505 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2023-11-24 13:16:36 UTC
Created attachment 875506 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-11-24 13:16:37 UTC
Created attachment 875507 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2023-11-24 13:16:38 UTC
Created attachment 875508 [details]
logs.tar.xz
Comment 8 Toralf Förster gentoo-dev 2023-11-24 13:16:40 UTC
Created attachment 875509 [details]
qlist-info.txt.xz
Comment 9 Toralf Förster gentoo-dev 2023-11-24 13:16:41 UTC
Created attachment 875510 [details]
temp.tar.xz
Comment 10 Mike Lothian 2023-11-24 18:24:04 UTC
Setting USE=usb-monitor gets things working for me

Looking at the code, it looks like ignored_vid_pid is defined inside an ifdef for USB, and then used outside in code not ifdef'd 

Has this been reported upstream?
Comment 11 Mike Lothian 2023-11-24 18:29:47 UTC
Created attachment 875542 [details, diff]
Work around

This gets things compiling
Comment 12 Chicago 2023-11-24 18:47:46 UTC
Thanks Mike, adding the usb-monitor USE flag got me rolling too.
Comment 13 genBTC 2023-11-25 04:51:40 UTC
Created attachment 875547 [details, diff]
source code edit to patch the missing symbol back in

An #ifdef USB section was preventing a symbol "ignored_vid_pid" from being defined, in the src/cmdline/cmd_parser_goption.c file.
This patch will move the symbol definition past the #endif.

Upstream should be informed of this break, so it can be resolved there.
Comment 14 genBTC 2023-11-25 04:54:13 UTC
Comment on attachment 875547 [details, diff]
source code edit to patch the missing symbol back in

The affected code location is here :
https://github.com/rockowitz/ddcutil/blob/2.0.2-dev/src/cmdline/cmd_parser_goption.c#L875
Comment 15 Hanno Böck gentoo-dev 2023-11-25 12:05:23 UTC
I reported it to upstream:
https://github.com/rockowitz/ddcutil/issues/355

I'm not entirely sure if moving the declaration out of the ifdef block is the correct fix, let's see what upstream says.
Comment 17 Larry the Git Cow gentoo-dev 2023-11-27 20:09:14 UTC
The bug has been closed via the following commit(s):

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

commit 79d92dece993d8d1d1a9d45a8f4f84c5d895009a
Author:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
AuthorDate: 2023-11-27 20:07:45 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
CommitDate: 2023-11-27 20:07:45 +0000

    app-misc/ddcutil: fix build USE=-usb-monitor, add missing dep
    
    Closes: https://bugs.gentoo.org/918124
    Closes: https://bugs.gentoo.org/918408
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

 ...dcutil-2.0.0.ebuild => ddcutil-2.0.0-r1.ebuild} |  2 ++
 ...2.0.0-fix-build-with-usb-monitor-disabled.patch | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)