[Libcdio-devel] [PATCH] libcdio.sym: Remove undefined symbols

2024-01-08 Thread Nicholas Vinson
With default options ld.lld-16 and newer fails to link due to undefined
symbols listed in libddio.sym. Specifically:

cdio_get_default_device_bsdi
cdio_get_devices_bsdi
cdio_have_bsdi
cdio_open_am_bsdi
cdio_open_bsdi
cdio_set_drive_speed
mmc_get_last_lsn
mmc_isrc_track_read_subchannel

The definitions for the 5 *_bsdi symbols were removed with commit
487136b3c6c80bbc772c56e6a388b12db55982f4.

Neither the definition nor declaration appear in the git history for the
symbols cdio_set_drive_speed and mmc_get_last_lsn.

The definition for was removed with commit
b427b174e664f632756bb1653fd2463592066fa3.

Fixes Gentoo bug 915826 ( https://bugs.gentoo.org/915826 ).

Signed-off-by: Nicholas Vinson 
---
 include/cdio/iso9660.h   | 2 +-
 lib/driver/libcdio.sym   | 8 
 lib/iso9660/iso9660_fs.c | 2 ++
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/include/cdio/iso9660.h b/include/cdio/iso9660.h
index f5eb09e2..6bb99460 100644
--- a/include/cdio/iso9660.h
+++ b/include/cdio/iso9660.h
@@ -910,8 +910,8 @@ iso9660_dir_calc_record_size (unsigned int namelen, 
unsigned int su_len);
@return stat_t of entry if we found lsn, or NULL otherwise.
Caller must free return value using iso9660_stat_free().
  */
-#define iso9660_fs_find_lsn  iso9660_find_fs_lsn
 iso9660_stat_t *iso9660_fs_find_lsn(CdIo_t *p_cdio, lsn_t i_lsn);
+iso9660_stat_t *iso9660_find_fs_lsn(CdIo_t *p_cdio, lsn_t i_lsn);
 
 
 /*!
diff --git a/lib/driver/libcdio.sym b/lib/driver/libcdio.sym
index 9143ccf5..7d757af9 100644
--- a/lib/driver/libcdio.sym
+++ b/lib/driver/libcdio.sym
@@ -48,7 +48,6 @@ cdio_get_cdtext
 cdio_get_cdtext_raw
 cdio_get_default_device
 cdio_get_default_device_bincue
-cdio_get_default_device_bsdi
 cdio_get_default_device_cdrdao
 cdio_get_default_device_driver
 cdio_get_default_device_freebsd
@@ -59,7 +58,6 @@ cdio_get_default_device_solaris
 cdio_get_default_device_win32
 cdio_get_devices
 cdio_get_devices_bincue
-cdio_get_devices_bsdi
 cdio_get_devices_cdrdao
 cdio_get_devices_freebsd
 cdio_get_devices_linux
@@ -101,7 +99,6 @@ cdio_get_track_sec_count
 cdio_guess_cd_type
 cdio_have_atapi
 cdio_have_bincue
-cdio_have_bsdi
 cdio_have_cdrdao
 cdio_have_driver
 cdio_have_freebsd
@@ -135,7 +132,6 @@ cdio_msf_to_str
 cdio_open
 cdio_open_am
 cdio_open_am_bincue
-cdio_open_am_bsdi
 cdio_open_am_cd
 cdio_open_am_cdrdao
 cdio_open_am_freebsd
@@ -146,7 +142,6 @@ cdio_open_am_osx
 cdio_open_am_solaris
 cdio_open_am_win32
 cdio_open_bincue
-cdio_open_bsdi
 cdio_open_cd
 cdio_open_cdrdao
 cdio_open_cue
@@ -171,7 +166,6 @@ cdio_read_sectors
 cdio_realpath
 cdio_set_arg
 cdio_set_blocksize
-cdio_set_drive_speed
 cdio_set_speed
 cdio_stdio_destroy
 cdio_stdio_new
@@ -224,7 +218,6 @@ mmc_get_drive_mmc_cap
 mmc_get_dvd_struct_physical
 mmc_get_event_status
 mmc_get_hwinfo
-mmc_get_last_lsn
 mmc_get_mcn
 mmc_get_media_changed
 mmc_get_track_isrc
@@ -236,7 +229,6 @@ mmc_is_disctype_cdrom
 mmc_is_disctype_dvd
 mmc_is_disctype_hd_dvd
 mmc_is_disctype_overwritable
-mmc_isrc_track_read_subchannel
 mmc_last_cmd_sense
 mmc_mode_select_10
 mmc_mode_sense
diff --git a/lib/iso9660/iso9660_fs.c b/lib/iso9660/iso9660_fs.c
index f18a2a16..f6843aec 100644
--- a/lib/iso9660/iso9660_fs.c
+++ b/lib/iso9660/iso9660_fs.c
@@ -1775,6 +1775,8 @@ iso9660_fs_find_lsn(CdIo_t *p_cdio, lsn_t i_lsn)
 free(psz_full_filename);
   return p_statbuf;
 }
+iso9660_stat_t *
+iso9660_find_fs_lsn(CdIo_t *p_cdio, lsn_t i_lsn) __attribute__ ((alias 
("iso9660_fs_find_lsn")));
 
 /*!
Given a directory pointer, find the filesystem entry that contains
-- 
2.43.0




Re: [Libcdio-devel] [PATCH] libcdio.sym: Remove undefined symbols

2024-01-08 Thread Rocky Bernstein
Thanks - I will try patching this soon.

I would be interested in seeing a failure, applying the patch and seeing a
fix.

Would you give me more information about the environment so I can replicate
this failure?

Thanks. and thanks for the patch.



On Mon, Jan 8, 2024 at 9:11 PM Nicholas Vinson  wrote:

> With default options ld.lld-16 and newer fails to link due to undefined
> symbols listed in libddio.sym. Specifically:
>
> cdio_get_default_device_bsdi
> cdio_get_devices_bsdi
> cdio_have_bsdi
> cdio_open_am_bsdi
> cdio_open_bsdi
> cdio_set_drive_speed
> mmc_get_last_lsn
> mmc_isrc_track_read_subchannel
>
> The definitions for the 5 *_bsdi symbols were removed with commit
> 487136b3c6c80bbc772c56e6a388b12db55982f4.
>
> Neither the definition nor declaration appear in the git history for the
> symbols cdio_set_drive_speed and mmc_get_last_lsn.
>
> The definition for was removed with commit
> b427b174e664f632756bb1653fd2463592066fa3.
>
> Fixes Gentoo bug 915826 ( https://bugs.gentoo.org/915826 ).
>
> Signed-off-by: Nicholas Vinson 
> ---
>  include/cdio/iso9660.h   | 2 +-
>  lib/driver/libcdio.sym   | 8 
>  lib/iso9660/iso9660_fs.c | 2 ++
>  3 files changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/include/cdio/iso9660.h b/include/cdio/iso9660.h
> index f5eb09e2..6bb99460 100644
> --- a/include/cdio/iso9660.h
> +++ b/include/cdio/iso9660.h
> @@ -910,8 +910,8 @@ iso9660_dir_calc_record_size (unsigned int namelen,
> unsigned int su_len);
> @return stat_t of entry if we found lsn, or NULL otherwise.
> Caller must free return value using iso9660_stat_free().
>   */
> -#define iso9660_fs_find_lsn  iso9660_find_fs_lsn
>  iso9660_stat_t *iso9660_fs_find_lsn(CdIo_t *p_cdio, lsn_t i_lsn);
> +iso9660_stat_t *iso9660_find_fs_lsn(CdIo_t *p_cdio, lsn_t i_lsn);
>
>
>  /*!
> diff --git a/lib/driver/libcdio.sym b/lib/driver/libcdio.sym
> index 9143ccf5..7d757af9 100644
> --- a/lib/driver/libcdio.sym
> +++ b/lib/driver/libcdio.sym
> @@ -48,7 +48,6 @@ cdio_get_cdtext
>  cdio_get_cdtext_raw
>  cdio_get_default_device
>  cdio_get_default_device_bincue
> -cdio_get_default_device_bsdi
>  cdio_get_default_device_cdrdao
>  cdio_get_default_device_driver
>  cdio_get_default_device_freebsd
> @@ -59,7 +58,6 @@ cdio_get_default_device_solaris
>  cdio_get_default_device_win32
>  cdio_get_devices
>  cdio_get_devices_bincue
> -cdio_get_devices_bsdi
>  cdio_get_devices_cdrdao
>  cdio_get_devices_freebsd
>  cdio_get_devices_linux
> @@ -101,7 +99,6 @@ cdio_get_track_sec_count
>  cdio_guess_cd_type
>  cdio_have_atapi
>  cdio_have_bincue
> -cdio_have_bsdi
>  cdio_have_cdrdao
>  cdio_have_driver
>  cdio_have_freebsd
> @@ -135,7 +132,6 @@ cdio_msf_to_str
>  cdio_open
>  cdio_open_am
>  cdio_open_am_bincue
> -cdio_open_am_bsdi
>  cdio_open_am_cd
>  cdio_open_am_cdrdao
>  cdio_open_am_freebsd
> @@ -146,7 +142,6 @@ cdio_open_am_osx
>  cdio_open_am_solaris
>  cdio_open_am_win32
>  cdio_open_bincue
> -cdio_open_bsdi
>  cdio_open_cd
>  cdio_open_cdrdao
>  cdio_open_cue
> @@ -171,7 +166,6 @@ cdio_read_sectors
>  cdio_realpath
>  cdio_set_arg
>  cdio_set_blocksize
> -cdio_set_drive_speed
>  cdio_set_speed
>  cdio_stdio_destroy
>  cdio_stdio_new
> @@ -224,7 +218,6 @@ mmc_get_drive_mmc_cap
>  mmc_get_dvd_struct_physical
>  mmc_get_event_status
>  mmc_get_hwinfo
> -mmc_get_last_lsn
>  mmc_get_mcn
>  mmc_get_media_changed
>  mmc_get_track_isrc
> @@ -236,7 +229,6 @@ mmc_is_disctype_cdrom
>  mmc_is_disctype_dvd
>  mmc_is_disctype_hd_dvd
>  mmc_is_disctype_overwritable
> -mmc_isrc_track_read_subchannel
>  mmc_last_cmd_sense
>  mmc_mode_select_10
>  mmc_mode_sense
> diff --git a/lib/iso9660/iso9660_fs.c b/lib/iso9660/iso9660_fs.c
> index f18a2a16..f6843aec 100644
> --- a/lib/iso9660/iso9660_fs.c
> +++ b/lib/iso9660/iso9660_fs.c
> @@ -1775,6 +1775,8 @@ iso9660_fs_find_lsn(CdIo_t *p_cdio, lsn_t i_lsn)
>  free(psz_full_filename);
>return p_statbuf;
>  }
> +iso9660_stat_t *
> +iso9660_find_fs_lsn(CdIo_t *p_cdio, lsn_t i_lsn) __attribute__ ((alias
> ("iso9660_fs_find_lsn")));
>
>  /*!
> Given a directory pointer, find the filesystem entry that contains
> --
> 2.43.0
>
>
>


Re: [Libcdio-devel] [PATCH] libcdio.sym: Remove undefined symbols

2024-01-08 Thread Nicholas Vinson

[Resending to include the mailing list]

On 1/8/24 21:33, Rocky Bernstein wrote:

Thanks - I will try patching this soon.

I would be interested in seeing a failure, applying the patch and seeing 
a fix.


Would you give me more information about the environment so I can 
replicate this failure?


I cloned the repository, created configure using the usual autotools, 
created a build folded in the repository, and then from the build folder 
I ran:


../configure \
CC="clang" \
CXX="clang++" \
CFLAGS="-O3 -pipe" \
CXXFLAGS="-O3 -pipe" \
--prefix=/usr \
--build=x86_64-pc-linux-gnu \
--host=x86_64-pc-linux-gnu \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc \
--localstatedir=/var/lib \
--disable-dependency-tracking \
--disable-silent-rules \
--docdir=/usr/share/doc/libcdio-2.1.0-r1 \
--htmldir=/usr/share/doc/libcdio-2.1.0-r1/html \
--with-sysroot=/ \
--libdir=/usr/lib64 \
--enable-maintainer-mode \
--enable-cxx \
--disable-cpp-progs \
--disable-example-progs \
--disable-static \
--disable-cddb \
--disable-vcd-info \
--with-cd-drive \
--with-cd-info \
--with-cdda-player \
--with-cd-read \
--with-iso-info \
--with-iso-read

which is heavily based on how Gentoo's package manager invokes 
configure. Afterwards, I ran


make V=1

and observed the error.

Full environment information given after signature.

Regards,
Nicholas Vinson

Portage 3.0.58 (python 3.11.7-final-0, default/linux/amd64/17.1/desktop, 
gcc-13, glibc-2.38-r9, 6.6.7-gentoo x86_64)

=
System uname: 
Linux-6.6.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-4771_CPU_@_3.50GHz-with-glibc2.38

KiB Mem:32553208 total,  13574508 free
KiB Swap:2097148 total,   2097148 free
Timestamp of repository gentoo: Mon, 08 Jan 2024 10:03:15 +
Head commit of repository gentoo: bbfaf0d3b4ad501749c7d5e5a41fee3933b6c0c4

Timestamp of repository brother-overlay: Tue, 26 Dec 2023 14:18:05 +
Head commit of repository brother-overlay: 
18efecd707fd1ed6ced4695c65294c5c945c78c6


Head commit of repository magpie: b7421a55e7f725875bd1c6e31f51b3a1c0e8a381

sh bash 5.2_p21-r1
ld GNU ld (Gentoo 2.41 p4) 2.41.0
app-misc/pax-utils:1.3.7::gentoo
app-shells/bash:   5.2_p21-r1::gentoo
dev-java/java-config:  2.3.3-r1::gentoo
dev-lang/perl: 5.38.2-r1::gentoo
dev-lang/python:   3.10.13::gentoo, 3.11.7::gentoo, 
3.12.1_p1::gentoo

dev-lang/rust: 1.74.1::gentoo
dev-util/cmake:3.28.1::gentoo
dev-util/meson:1.3.1::gentoo
sys-apps/baselayout:   2.14-r1::gentoo
sys-apps/openrc:   0.52.1::gentoo
sys-apps/sandbox:  2.38::gentoo
sys-devel/autoconf:2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo
sys-devel/automake:1.16.5-r1::gentoo
sys-devel/binutils:2.41-r4::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:   16.0.6::gentoo, 17.0.6::gentoo
sys-devel/gcc: 13.2.1_p20231216::gentoo
sys-devel/gcc-config:  2.11::gentoo
sys-devel/libtool: 2.4.7-r1::gentoo
sys-devel/lld: 17.0.6::gentoo
sys-devel/llvm:16.0.6::gentoo, 17.0.6::gentoo
sys-devel/make:4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
sys-libs/glibc:2.38-r9::gentoo
Repositories:

gentoo
 location: /var/db/repos/gentoo
 sync-type: git
 sync-uri: https://github.com/gentoo-mirror/gentoo.git
 priority: -1000
 volatile: False
 sync-git-verify-commit-signature: true

brother-overlay
 location: /var/db/repos/brother-overlay
 sync-type: git
 sync-uri: https://github.com/gentoo-mirror/brother-overlay.git
 masters: gentoo
 volatile: False

magpie
 location: /var/db/repos/magpie
 sync-type: git
 sync-uri: https://github.com/nvinson/magpie.git
 masters: gentoo
 volatile: False

ABI="amd64"
ABI_X86="64"
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ADA_TARGET="gnat_2021"
ANT_HOME="/usr/share/ant"
APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias 
auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile 
authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs 
dav_lock deflate dir env expires ext_filter file_cache filter headers 
include info log_config logio mime mime_magic negotiation rewrite 
setenvif speling status unique_id userdir u

Re: [Libcdio-devel] [PATCH] libcdio.sym: Remove undefined symbols

2024-01-08 Thread Rocky Bernstein
I have not been able to reproduce the problem using the configure options
given, however the patch seems reasonable.

I have applied it in branch nvinson234 in git on savannah.gnu.org See
https://git.savannah.gnu.org/cgit/libcdio.git/commit/?h=nvinsion234&id=4ebc31bf828e3503891a201ecb6ef7e92ac52359

Please try this branch out and let me know if this addresses the issue. If
so, I'll merge it into master.

Thanks for the bug report.

On Mon, Jan 8, 2024 at 9:47 PM Nicholas Vinson  wrote:

> [Resending to include the mailing list]
>
> On 1/8/24 21:33, Rocky Bernstein wrote:
> > Thanks - I will try patching this soon.
> >
> > I would be interested in seeing a failure, applying the patch and seeing
> > a fix.
> >
> > Would you give me more information about the environment so I can
> > replicate this failure?
>
> I cloned the repository, created configure using the usual autotools,
> created a build folded in the repository, and then from the build folder
> I ran:
>
> ../configure \
> CC="clang" \
> CXX="clang++" \
> CFLAGS="-O3 -pipe" \
> CXXFLAGS="-O3 -pipe" \
> --prefix=/usr \
> --build=x86_64-pc-linux-gnu \
> --host=x86_64-pc-linux-gnu \
> --mandir=/usr/share/man \
> --infodir=/usr/share/info \
> --datadir=/usr/share \
> --sysconfdir=/etc \
> --localstatedir=/var/lib \
> --disable-dependency-tracking \
> --disable-silent-rules \
> --docdir=/usr/share/doc/libcdio-2.1.0-r1 \
> --htmldir=/usr/share/doc/libcdio-2.1.0-r1/html \
> --with-sysroot=/ \
> --libdir=/usr/lib64 \
> --enable-maintainer-mode \
> --enable-cxx \
> --disable-cpp-progs \
> --disable-example-progs \
> --disable-static \
> --disable-cddb \
> --disable-vcd-info \
> --with-cd-drive \
> --with-cd-info \
> --with-cdda-player \
> --with-cd-read \
> --with-iso-info \
> --with-iso-read
>
> which is heavily based on how Gentoo's package manager invokes
> configure. Afterwards, I ran
>
> make V=1
>
> and observed the error.
>
> Full environment information given after signature.
>
> Regards,
> Nicholas Vinson
>
> Portage 3.0.58 (python 3.11.7-final-0, default/linux/amd64/17.1/desktop,
> gcc-13, glibc-2.38-r9, 6.6.7-gentoo x86_64)
> =
> System uname:
> Linux-6.6.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-4771_CPU_@
> _3.50GHz-with-glibc2.38
> KiB Mem:32553208 total,  13574508 free
> KiB Swap:2097148 total,   2097148 free
> Timestamp of repository gentoo: Mon, 08 Jan 2024 10:03:15 +
> Head commit of repository gentoo: bbfaf0d3b4ad501749c7d5e5a41fee3933b6c0c4
>
> Timestamp of repository brother-overlay: Tue, 26 Dec 2023 14:18:05 +
> Head commit of repository brother-overlay:
> 18efecd707fd1ed6ced4695c65294c5c945c78c6
>
> Head commit of repository magpie: b7421a55e7f725875bd1c6e31f51b3a1c0e8a381
>
> sh bash 5.2_p21-r1
> ld GNU ld (Gentoo 2.41 p4) 2.41.0
> app-misc/pax-utils:1.3.7::gentoo
> app-shells/bash:   5.2_p21-r1::gentoo
> dev-java/java-config:  2.3.3-r1::gentoo
> dev-lang/perl: 5.38.2-r1::gentoo
> dev-lang/python:   3.10.13::gentoo, 3.11.7::gentoo,
> 3.12.1_p1::gentoo
> dev-lang/rust: 1.74.1::gentoo
> dev-util/cmake:3.28.1::gentoo
> dev-util/meson:1.3.1::gentoo
> sys-apps/baselayout:   2.14-r1::gentoo
> sys-apps/openrc:   0.52.1::gentoo
> sys-apps/sandbox:  2.38::gentoo
> sys-devel/autoconf:2.13-r8::gentoo, 2.71-r7::gentoo,
> 2.72-r1::gentoo
> sys-devel/automake:1.16.5-r1::gentoo
> sys-devel/binutils:2.41-r4::gentoo
> sys-devel/binutils-config: 5.5::gentoo
> sys-devel/clang:   16.0.6::gentoo, 17.0.6::gentoo
> sys-devel/gcc: 13.2.1_p20231216::gentoo
> sys-devel/gcc-config:  2.11::gentoo
> sys-devel/libtool: 2.4.7-r1::gentoo
> sys-devel/lld: 17.0.6::gentoo
> sys-devel/llvm:16.0.6::gentoo, 17.0.6::gentoo
> sys-devel/make:4.4.1-r1::gentoo
> sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
> sys-libs/glibc:2.38-r9::gentoo
> Repositories:
>
> gentoo
>   location: /var/db/repos/gentoo
>   sync-type: git
>   sync-uri: https://github.com/gentoo-mirror/gentoo.git
>   priority: -1000
>   volatile: False
>   sync-git-verify-commit-signature: true
>
> brother-overlay
>   location: /var/db/repos/brother-overlay
>   sync-type: git
>   sync-uri: https://github.com/gentoo-mirror/brother-overlay.git
>   masters: gentoo
>   volatile: False
>
>