Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 641550 - media-video/vcdimager-0.7.24 : /.../info.c:144:3: error: too few arguments to function _cdio_list_free
Summary: media-video/vcdimager-0.7.24 : /.../info.c:144:3: error: too few arguments to...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-18 12:39 UTC by Toralf Förster
Modified: 2018-12-02 20:26 UTC (History)
16 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,17.30 KB, text/plain)
2017-12-18 12:39 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,266.73 KB, text/plain)
2017-12-18 12:39 UTC, Toralf Förster
Details
environment (environment,62.85 KB, text/plain)
2017-12-18 12:39 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,19.40 KB, application/x-bzip)
2017-12-18 12:39 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,8.88 KB, application/x-bzip)
2017-12-18 12:39 UTC, Toralf Förster
Details
media-video:vcdimager-0.7.24:20171218-102542.log (media-video:vcdimager-0.7.24:20171218-102542.log,17.42 KB, text/plain)
2017-12-18 12:39 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,19.63 KB, application/x-bzip)
2017-12-18 12:39 UTC, Toralf Förster
Details
New ebuild with patches (vcdimage-update.tbz2,6.00 KB, application/x-bzip)
2018-01-03 18:24 UTC, Luke A. Guest
Details
implicit declaration of strptime fix (4_vcdimager-0.7.24-implicit-strptime-fix.patch,865 bytes, patch)
2018-01-21 16:55 UTC, Attila Tóth
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 2017-12-18 12:39:25 UTC
 CdioList_t * iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[]);
              ^~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info.c:144:3: error: too few arguments to function ‘_cdio_list_free’
   _cdio_list_free (entlist, true);
   ^~~~~~~~~~~~~~~
In file included from /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info_private.h:34:0,

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-desktop_libressl_20171211-202647

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.5
  [2]   python2.7 (fallback)
  [3]   jython2.7 (fallback)
Available Ruby profiles:
  [1]   ruby22 (with Rubygems) *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.6.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpv media-video/vcdimager
[ebuild  N    ] media-video/vcdimager-0.7.24  USE="xml -static-libs" ABI_X86="(64) -32 (-x32)"
Comment 1 Toralf Förster gentoo-dev 2017-12-18 12:39:28 UTC
Created attachment 510654 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-12-18 12:39:31 UTC
Created attachment 510656 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2017-12-18 12:39:34 UTC
Created attachment 510658 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2017-12-18 12:39:38 UTC
Created attachment 510660 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2017-12-18 12:39:40 UTC
Created attachment 510662 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-12-18 12:39:43 UTC
Created attachment 510664 [details]
media-video:vcdimager-0.7.24:20171218-102542.log
Comment 7 Toralf Förster gentoo-dev 2017-12-18 12:39:46 UTC
Created attachment 510666 [details]
temp.tbz2
Comment 8 Conrad Kostecki gentoo-dev 2018-01-02 13:15:02 UTC
Upstream Bugreport: https://savannah.gnu.org/support/?109436
Comment 9 Luke A. Guest 2018-01-03 18:24:45 UTC
Created attachment 513106 [details]
New ebuild with patches

Patches fix the build issues, totally untested apart from building.
Comment 10 Adam Stylinski 2018-01-04 16:41:18 UTC
(In reply to Luke A. Guest from comment #9)
> Created attachment 513106 [details]
> New ebuild with patches
> 
> Patches fix the build issues, totally untested apart from building.

I know you grabbed those patches from the bug reports upstream, but should be passing NULL as the function pointer for the free callback there?  Won't that create a memory leak?  Granted, this changelog: http://git.savannah.gnu.org/cgit/libcdio.git/commit/?id=73800fc0cd81a735764f79b7f3f957d8a71eb02c shows some invocations of that free call with a NULL function pointer but for many there are a few different free functions being used.  Maybe it's stack memory that call this with NULL and heap with a free callback?
Comment 11 Adam Stylinski 2018-01-04 16:59:31 UTC
(In reply to Adam Stylinski from comment #10)
> (In reply to Luke A. Guest from comment #9)
> > Created attachment 513106 [details]
> > New ebuild with patches
> > 
> > Patches fix the build issues, totally untested apart from building.
> 
> I know you grabbed those patches from the bug reports upstream, but should
> be passing NULL as the function pointer for the free callback there?  Won't
> that create a memory leak?  Granted, this changelog:
> http://git.savannah.gnu.org/cgit/libcdio.git/commit/
> ?id=73800fc0cd81a735764f79b7f3f957d8a71eb02c shows some invocations of that
> free call with a NULL function pointer but for many there are a few
> different free functions being used.  Maybe it's stack memory that call this
> with NULL and heap with a free callback?

After further examining the code, the real fix (to be compatible with what was done before) is to specify the free function as the function pointer.  It looks like the old behavior would just call free directly after dereferencing the non-NULL node pointer.
Comment 12 Luke A. Guest 2018-01-04 20:13:17 UTC
(In reply to Adam Stylinski from comment #10)
> (In reply to Luke A. Guest from comment #9)
> > Created attachment 513106 [details]
> > New ebuild with patches
> > 
> > Patches fix the build issues, totally untested apart from building.
> 
> I know you grabbed those patches from the bug reports upstream, but should

I didn't actually. I didn't see any patches in the above link.

> be passing NULL as the function pointer for the free callback there?  Won't

If there's no callback for the allocation, I see no point of one in the free.

> that create a memory leak?  Granted, this changelog:
> http://git.savannah.gnu.org/cgit/libcdio.git/commit/
> ?id=73800fc0cd81a735764f79b7f3f957d8a71eb02c shows some invocations of that
> free call with a NULL function pointer but for many there are a few
> different free functions being used.  Maybe it's stack memory that call this
> with NULL and heap with a free callback?
Comment 13 Martin Dummer 2018-01-09 07:10:28 UTC
AFAIK this is caused by API changes in dev-libs/libcdio-1.1.0 and higher

See Bug #638646

and comment https://bugs.gentoo.org/638646#c27

Masking =dev-libs/libcdio-1.1.0 and =dev-libs/libcdio-2.0.0 works for me.
Comment 14 Andrew 2018-01-14 09:28:08 UTC
The patch from  Luke A. Guest works (~x86 box)
Comment 15 Martin Doucha 2018-01-15 12:20:34 UTC
Could you at least update the vcdimager ebuild to require libcdio:0/17? Slot dependency will temporarily solve this bug until vcdimager gets updated to the new API.
Comment 16 Attila Tóth 2018-01-15 14:36:10 UTC
(In reply to Martin Doucha from comment #15)
> Could you at least update the vcdimager ebuild to require libcdio:0/17? Slot
> dependency will temporarily solve this bug until vcdimager gets updated to
> the new API.

I would rather consider to update the patches of the current ebuild to make it compatible with the recent libcdio.
Comment 17 Petross404(Petros S) 2018-01-21 15:59:02 UTC
I can confirm that the new ebuild compiles vcdimager, but I get this QA Notice:

 * QA Notice: Package triggers severe warnings which indicate that it
 *            may exhibit random runtime failures.
 * /tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/frontends/cli/vcdimager.c:413:19: warning: implicit declaration of function ‘strptime’; did you mean ‘strftime’? [-Wimplicit-function-declaration]
 * /tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/frontends/xml/vcd_xml_build.c:478:14: warning: implicit declaration of function ‘strptime’; did you mean ‘strftime’? [-Wimplicit-function-declaration]

 * Please do not file a Gentoo bug and instead report the above QA
 * issues directly to the upstream developers of this software.
 * Homepage: http://www.vcdimager.org/
Comment 18 Attila Tóth 2018-01-21 16:54:10 UTC
(In reply to Petross404(Petros S) from comment #17)
> I can confirm that the new ebuild compiles vcdimager, but I get this QA
> Notice:
> 
>  * QA Notice: Package triggers severe warnings which indicate that it
>  *            may exhibit random runtime failures.
>  *
> /tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/frontends/
> cli/vcdimager.c:413:19: warning: implicit declaration of function
> ‘strptime’; did you mean ‘strftime’? [-Wimplicit-function-declaration]
>  *
> /tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/frontends/
> xml/vcd_xml_build.c:478:14: warning: implicit declaration of function
> ‘strptime’; did you mean ‘strftime’? [-Wimplicit-function-declaration]
> 
>  * Please do not file a Gentoo bug and instead report the above QA
>  * issues directly to the upstream developers of this software.
>  * Homepage: http://www.vcdimager.org/

I attach a patch for that. Only applies after other patches in this bug.
Comment 19 Attila Tóth 2018-01-21 16:55:19 UTC
Created attachment 515720 [details, diff]
implicit declaration of strptime fix

Applies cleanly only after libcdio-1 and libcdio-2 patches applied.
Comment 20 Adam Stylinski 2018-01-31 20:34:33 UTC
(In reply to Luke A. Guest from comment #12)
> (In reply to Adam Stylinski from comment #10)
> > (In reply to Luke A. Guest from comment #9)
> > > Created attachment 513106 [details]
> > > New ebuild with patches
> > > 
> > > Patches fix the build issues, totally untested apart from building.
> > 
> > I know you grabbed those patches from the bug reports upstream, but should
> 
> I didn't actually. I didn't see any patches in the above link.
> 
> > be passing NULL as the function pointer for the free callback there?  Won't
> 
> If there's no callback for the allocation, I see no point of one in the free.
> 
> > that create a memory leak?  Granted, this changelog:
> > http://git.savannah.gnu.org/cgit/libcdio.git/commit/
> > ?id=73800fc0cd81a735764f79b7f3f957d8a71eb02c shows some invocations of that
> > free call with a NULL function pointer but for many there are a few
> > different free functions being used.  Maybe it's stack memory that call this
> > with NULL and heap with a free callback?

The old behavior actually did call free - this one does not (it calls whatever callback you've specified if it's non-null and exits otherwise).
Comment 21 Larry the Git Cow gentoo-dev 2018-04-07 20:49:27 UTC
The bug has been referenced in the following commit(s):

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

commit 36118ca20461b5421246550de2b2af247b5cec7b
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2018-04-07 20:32:14 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2018-04-07 20:48:48 +0000

    media-video/vcdimager: 2.0.1 version bump
    
    Bug: https://bugs.gentoo.org/641550
    Closes: https://bugs.gentoo.org/641470
    Package-Manager: Portage-2.3.28, Repoman-2.3.9

 media-video/vcdimager/Manifest               |  1 +
 media-video/vcdimager/vcdimager-2.0.1.ebuild | 57 ++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+)}
Comment 22 Israel G. Lugo 2018-12-02 20:26:17 UTC
The fix may or may not have fixed =media-video/vcdimager-2.0.1, but it most certainly did not fix =media-video/vcdimager-0.7.24.

I just had my existing packages broken in stable, because =dev-libs/libcdio-2.0.0-r1 has been marked stable and =media-video/vcdimager-0.7.24 does not know it needs to depend on <1.0.

vcdimager-0.7.24 is marked stable and breaks with the new stable version of libcdio, 2.0.0-r1. Please do as comment #15 suggested and alter the dependencies of =media-video/vcdimager-0.7.24 so it doesn't try to build with the new incompatible version of libcdio.

Either that, or divide libcdio into slots...


Making all in lib
make[2]: Entering directory '/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24-abi_x86_32.x86/lib'
/bin/sh ../libtool --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -m32 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib -I.. -I/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/include/ -I/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/     -O2 -march=native -mmmx -mpopcnt -msse -msse2 -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -maes -mfpmath=sse -pipe -fno-stack-protector  -Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare -c -o info.lo /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -m32 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib -I.. -I/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/include/ -I/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/ -O2 -march=native -mmmx -mpopcnt -msse -msse2 -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -maes -mfpmath=sse -pipe -fno-stack-protector -Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare -c /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info.c  -fPIC -DPIC -o .libs/info.o
/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info.c: In function ‘_init_segments’:
/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info.c:109:13: error: too many arguments to function ‘iso9660_fs_readdir’
   entlist = iso9660_fs_readdir(p_obj->img, "SEGMENT", true);
             ^~~~~~~~~~~~~~~~~~
In file included from /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info_private.h:35:0,
                 from /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info.c:28:
/usr/include/cdio/iso9660.h:1060:14: note: declared here
 CdioList_t * iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[]);
              ^~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info.c:144:3: error: too few arguments to function ‘_cdio_list_free’
   _cdio_list_free (entlist, true);
   ^~~~~~~~~~~~~~~
In file included from /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info_private.h:34:0,
                 from /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info.c:28:
/usr/include/cdio/ds.h:46:6: note: declared here
 void _cdio_list_free (CdioList_t *p_list, int free_data, CdioDataFree_t free_fn);
      ^~~~~~~~~~~~~~~