Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Tk-JPEG-Lite-2.15.0-r1 emerge fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Skippy204
Guru
Guru


Joined: 09 May 2008
Posts: 347
Location: Colorado, USA

PostPosted: Fri Aug 23, 2024 12:23 pm    Post subject: [solved] Tk-JPEG-Lite-2.15.0-r1 emerge fails Reply with quote

Code:
Dependency resolution took 18.65 s (backtrack: 0/20).

[ebuild  N     ] dev-perl/Tk-JPEG-Lite-2.15.0-r1::gentoo  USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) dev-perl/Tk-JPEG-Lite-2.15.0-r1::gentoo
 * Tk-JPEG-Lite-2.015.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                     [ ok ]
>>> Unpacking source...
>>> Unpacking Tk-JPEG-Lite-2.015.tar.gz to /var/tmp/portage/dev-perl/Tk-JPEG-Lite-2.15.0-r1/work
>>> Source unpacked in /var/tmp/portage/dev-perl/Tk-JPEG-Lite-2.15.0-r1/work
>>> Preparing source in /var/tmp/portage/dev-perl/Tk-JPEG-Lite-2.15.0-r1/work/Tk-JPEG-Lite-2.015 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-perl/Tk-JPEG-Lite-2.15.0-r1/work/Tk-JPEG-Lite-2.015 ...
 * Using ExtUtils::MakeMaker
 * perl Makefile.PL AR=x86_64-pc-linux-gnu-ar CC=x86_64-pc-linux-gnu-gcc CPP=x86_64-pc-linux-gnu-gcc -E LD=x86_64-pc-linux-gnu-gcc NM=x86_64-pc-linux-gnu-nm RANLIB=x86_64-pc-linux-gnu-ranlib OPTIMIZE=-march=native -O2 -pipe LDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs PREFIX=/usr INSTALLDIRS=vendor INSTALLMAN3DIR=none
/var/tmp/portage/dev-perl/Tk-JPEG-Lite-2.15.0-r1/work/Tk-JPEG-Lite-2.015 does not start with /usr/lib64/perl5/vendor_perl/5.40/x86_64-linux
i.e. building outside Tk itself
Checking if your kit is complete...
Looks good
'CPP' is not a known MakeMaker parameter name.
'NM' is not a known MakeMaker parameter name.
Finding dependencies for Lite.xs
Finding dependencies for imgJPEG.c
Generating a Unix-style Makefile
Writing Makefile for Tk::JPEG::Lite
Writing MYMETA.yml and MYMETA.json
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-perl/Tk-JPEG-Lite-2.15.0-r1/work/Tk-JPEG-Lite-2.015 ...
make -j6 'OTHERLDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs' 'OPTIMIZE=-march=native -O2 -pipe'
"/usr/bin/perl" "/usr/lib64/perl5/5.40/ExtUtils/xsubpp"  -typemap '/usr/lib64/perl5/5.40/ExtUtils/typemap' -typemap '/usr/lib64/perl5/vendor_perl/5.40/x86_64-linux/Tk/typemap'  Lite.xs > Lite.xsc
Running Mkbootstrap for Lite ()
x86_64-pc-linux-gnu-gcc -c  -I/usr/lib64/perl5/vendor_perl/5.40/x86_64-linux/Tk -I/usr/local/include  -I/usr/include/freetype2 -march=native -O2 -pipe -fno-strict-aliasing -DNO_PERL_RAND_SEED -fwrapv -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=native -O2 -pipe   -DVERSION=\"2.015\" -DXS_VERSION=\"804.036\" -fPIC "-I/usr/lib64/perl5/5.40/x86_64-linux/CORE"  -DHAVE_JPEGLIB_H  imgJPEG.c
chmod 644 "Lite.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Lite.bs blib/arch/auto/Tk/JPEG/Lite/Lite.bs 644
cp Lite.pm blib/lib/Tk/JPEG/Lite.pm
mv Lite.xsc Lite.c
x86_64-pc-linux-gnu-gcc -c  -I/usr/lib64/perl5/vendor_perl/5.40/x86_64-linux/Tk -I/usr/local/include  -I/usr/include/freetype2 -march=native -O2 -pipe -fno-strict-aliasing -DNO_PERL_RAND_SEED -fwrapv -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=native -O2 -pipe   -DVERSION=\"2.015\" -DXS_VERSION=\"804.036\" -fPIC "-I/usr/lib64/perl5/5.40/x86_64-linux/CORE"  -DHAVE_JPEGLIB_H  Lite.c
imgJPEG.c:131:5: error: initialization of ‘int (*)(Tcl_Interp *, Tcl_Obj *, Tk_PhotoImageBlock *)’ from incompatible pointer type ‘int (*)(Tcl_Interp *, Tcl_Obj **, Tcl_Obj *, Tk_PhotoImageBlock *)’ [-Wincompatible-pointer-types]
  131 |     StringWriteJPEG,    /* stringWriteProc */
      |     ^~~~~~~~~~~~~~~
imgJPEG.c:131:5: note: (near initialization for ‘imgFmtJPEG.stringWriteProc’)
imgJPEG.c: In function ‘CommonReadJPEG’:
imgJPEG.c:997:54: error: passing argument 3 of ‘TcldeclsVptr->V_Tcl_GetIndexFromObj’ from incompatible pointer type [-Wincompatible-pointer-types]
  997 |             if (Tcl_GetIndexFromObj(interp, objv[i], jpegReadOptions, "format option",
      |                                                      ^~~~~~~~~~~~~~~
      |                                                      |
      |                                                      char **
imgJPEG.c:997:54: note: expected ‘const char **’ but argument is of type ‘char **’
imgJPEG.c: In function ‘CommonWriteJPEG’:
imgJPEG.c:1303:54: error: passing argument 3 of ‘TcldeclsVptr->V_Tcl_GetIndexFromObj’ from incompatible pointer type [-Wincompatible-pointer-types]
 1303 |             if (Tcl_GetIndexFromObj(interp, objv[i], jpegWriteOptions,
      |                                                      ^~~~~~~~~~~~~~~~
      |                                                      |
      |                                                      char **
imgJPEG.c:1303:54: note: expected ‘const char **’ but argument is of type ‘char **’
make: *** [Makefile:357: imgJPEG.o] Error 1
make: *** Waiting for unfinished jobs....
 * ERROR: dev-perl/Tk-JPEG-Lite-2.15.0-r1::gentoo failed (compile phase):
 *   emake failed
 *



Code:

root # emerge --info '=dev-perl/Tk-JPEG-Lite-2.15.0-r1::gentoo'
Portage 3.0.65 (python 3.11.9-final-0, default/linux/amd64/23.0/split-usr, gcc-14, glibc-2.40, 5.7.15-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.7.15-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-glibc2.40
KiB Mem:    24627236 total,    186912 free
KiB Swap:   19535036 total,  19533748 free
Timestamp of repository gentoo: Fri, 23 Aug 2024 11:30:00 +0000
Head commit of repository gentoo: 89e26c64ffa0d58569c81009e19c159a8848e053
Timestamp of repository guru: Fri, 23 Aug 2024 00:48:54 +0000
Head commit of repository guru: b478b23979b40c1130b1f9300a91605e4b5a3fe0

Head commit of repository benzene-overlay: 30ce86bc70ef6264e6f59417c5841ee67bd52f7d

Head commit of repository brave-overlay: 7c04fbe31c435fe784c2e25a174bddc82f115025

sh bash 5.2_p32
ld GNU ld (Gentoo 2.42 p6) 2.42.0
ccache version 4.10.2 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p32::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo, 1.17-r1::gentoo
dev-build/cmake:           3.30.2::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.5.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.11.9_p1::gentoo, 3.12.5::gentoo, 3.13.0_rc1_p2::gentoo
dev-lang/rust:             1.79.0::gentoo
dev-lang/rust-bin:         1.80.1::gentoo
dev-util/ccache:           4.10.2::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.2::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.42-r2::gentoo, 2.43::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           17.0.6::gentoo, 18.1.8::gentoo
sys-devel/gcc:             14.2.1_p20240817::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo, 18.1.8::gentoo
sys-devel/llvm:            17.0.6-r2::gentoo, 18.1.8-r4::gentoo
sys-kernel/linux-headers:  6.10::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts:

Skippy
    location: /usr/local/portage/skippy
    masters: gentoo
    volatile: True

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

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0
    volatile: True

benzene-overlay
    location: /var/lib/layman/benzene-overlay
    sync-type: git
    sync-uri: https://github.com/Universebenzene/benzene-overlay
    masters: gentoo
    priority: 50
    volatile: True

brave-overlay
    location: /var/lib/layman/brave-overlay
    sync-type: git
    sync-uri: https://gitlab.com/jason.oliveira/brave-overlay
    masters: gentoo
    priority: 50
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/angband/gamedata/ /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --exclude net-news/quiterss"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo https://gentoo.osuosl.org/ http://gentoo.osuosl.org/ http://mirror.leaseweb.com/gentoo/ http://mirrors.rit.edu/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en en_GB en_US"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl aim alsa amd64 amrnb amrub arts aspell bzip2 cdda cddb cdr cet consolekit crypt css dbus dillo dvd dvdr encode exif extensions extras ffmpeg flac fontconfig fts3 gdbm gimp gnutls graphicsmagick gstreamer gtk hddtemp iconv id3tag imap ipv6 jadetex java jpeg jpeg2k kde kf6compat kipi ladspa lcms ldap libsamplerate libtirpc lm_sensors mad midi mikmod mjpeg mmx mng mono mp3 mp4 mpeg mplayer multilib musepack musicbrainz mysql ncurses nls nvidia offensive ogg opengl openmp oscar pam pcre pdf png policykit portaudio qt3support quicktime readline redeyes scanner seccomp secure-delete semantic-desktop smp sndfile soundtouch spamassassin spell split-usr sql sqlite sse sse2 ssl svg test-rust theora tiff twolame udev ukit unicode vamp vcd vorbis wavpack wmf xattr xinerama xmp xvid xvmc zlib" ABI_X86="32 64" ADA_TARGET="gcc_12" ALSA_CARDS="hda-intel intel8x0 intel8x0m" 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 usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" L10N="en en_GB en_US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby32" VIDEO_CARDS="nvidia fbdev vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS



Last edited by Skippy204 on Wed Aug 28, 2024 3:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1627
Location: Germany

PostPosted: Fri Aug 23, 2024 12:51 pm    Post subject: Reply with quote

There is a bug still open https://packages.gentoo.org/packages/dev-perl/Tk-JPEG-Lite/bugs which reads similar.
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
Skippy204
Guru
Guru


Joined: 09 May 2008
Posts: 347
Location: Colorado, USA

PostPosted: Fri Aug 23, 2024 12:55 pm    Post subject: Reply with quote

I saw that bug report, but given how old it is I didn't bother to read it. I just assumed that would have been fixed by now.

Once again... never assume.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1865

PostPosted: Fri Aug 23, 2024 12:58 pm    Post subject: Reply with quote

Yes, doing the Modern C porting is a lot of work.
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 556

PostPosted: Sat Aug 24, 2024 12:03 am    Post subject: Reply with quote

Actually, this one looks pretty easy to fix. Add this /etc/portage/patches/dev-perl/Tk-JPEG-Lite-2.15.0/Tk-JPEG-Lite-2.15.0-Modenize-C.patch:
Code:
diff --git a/imgJPEG.c b/imgJPEG.c
index cb62e40..4ca80b5 100644
--- a/imgJPEG.c
+++ b/imgJPEG.c
@@ -118,7 +118,7 @@ static int   ChnWriteJPEG _ANSI_ARGS_((Tcl_Interp *interp,
           char *fileName, Tcl_Obj *format,
           Tk_PhotoImageBlock *blockPtr));
 static int   StringWriteJPEG _ANSI_ARGS_((Tcl_Interp *interp,
-          Tcl_DString *dataPtr, Tcl_Obj *format,
+          Tcl_Obj *format,
           Tk_PhotoImageBlock *blockPtr));
 
 Tk_PhotoImageFormat imgFmtJPEG = {
@@ -970,7 +970,7 @@ CommonReadJPEG(interp, cinfo, format, imageHandle, destX, destY,
     int srcX, srcY;      /* Coordinates of top-left pixel to be used
              * in image being read. */
 {
-    static char *jpegReadOptions[] = {"-fast", "-grayscale", NULL};
+    static const char *jpegReadOptions[] = {"-fast", "-grayscale", NULL};
     int fileWidth, fileHeight, stopY, curY, outY, outWidth, outHeight;
     myblock bl;
 #define block bl.ck
@@ -1262,7 +1262,7 @@ CommonWriteJPEG(interp, cinfo, format, blockPtr)
     Tcl_Obj *format;
     Tk_PhotoImageBlock *blockPtr;
 {
-    static char *jpegWriteOptions[] = {"-grayscale", "-optimize",
+    static const char *jpegWriteOptions[] = {"-grayscale", "-optimize",
    "-progressive", "-quality", "-smooth", NULL};
     JSAMPROW row_pointer[1];   /* pointer to original data scanlines */
     JSAMPARRAY buffer;      /* Intermediate row buffer */


Tell me if it works and I'll submit a PR.
Back to top
View user's profile Send private message
Skippy204
Guru
Guru


Joined: 09 May 2008
Posts: 347
Location: Colorado, USA

PostPosted: Mon Aug 26, 2024 11:22 am    Post subject: Reply with quote

Thank you. I will test this.

I'm busy with work so it might be 3 or more days before I can test and get back to you - but I will let you know.

Thank you very much.
Back to top
View user's profile Send private message
Skippy204
Guru
Guru


Joined: 09 May 2008
Posts: 347
Location: Colorado, USA

PostPosted: Tue Aug 27, 2024 11:34 am    Post subject: Reply with quote

Did I mess something up? Hunks are failing. Sounds like a bad time all around.

Code:

Dependency resolution took 117.87 s (backtrack: 0/20).

[ebuild  N     ] dev-perl/Tk-JPEG-Lite-2.15.0-r1::gentoo  USE="-test" PERL_FEATURES="(-debug) -ithreads -quadmath" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) dev-perl/Tk-JPEG-Lite-2.15.0-r1::gentoo
 * Tk-JPEG-Lite-2.015.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                     [ ok ]
>>> Unpacking source...
>>> Unpacking Tk-JPEG-Lite-2.015.tar.gz to /var/tmp/portage/dev-perl/Tk-JPEG-Lite-2.15.0-r1/work
>>> Source unpacked in /var/tmp/portage/dev-perl/Tk-JPEG-Lite-2.15.0-r1/work
>>> Preparing source in /var/tmp/portage/dev-perl/Tk-JPEG-Lite-2.15.0-r1/work/Tk-JPEG-Lite-2.015 ...
 * =================================================================================================================================================
 * Applying user patches from /etc/portage/patches ...
 * Applying Tk-JPEG-Lite-2.15.0-Modenize-C.patch ...
patching file imgJPEG.c
Hunk #1 FAILED at 118.
Hunk #2 succeeded at 970 with fuzz 2.
Hunk #3 FAILED at 1262.
2 out of 3 hunks FAILED -- saving rejects to file imgJPEG.c.rej                                                                              [ !! ]
 * ERROR: dev-perl/Tk-JPEG-Lite-2.15.0-r1::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/dev-perl/Tk-JPEG-Lite-2.15.0/Tk-JPEG-Lite-2.15.0-Modenize-C.patch
 *
 * Call stack:
 *               ebuild.sh, line  136:  Called src_prepare
 *             environment, line 1822:  Called perl-module_src_prepare
 *             environment, line 1391:  Called default
 *      phase-functions.sh, line  873:  Called default_src_prepare
 *      phase-functions.sh, line  949:  Called __eapi8_src_prepare
 *             environment, line  354:  Called eapply_user
 *             environment, line  576:  Called eapply '/etc/portage/patches/dev-perl/Tk-JPEG-Lite-2.15.0/Tk-JPEG-Lite-2.15.0-Modenize-C.patch'
 *             environment, line  536:  Called _eapply_patch '/etc/portage/patches/dev-perl/Tk-JPEG-Lite-2.15.0/Tk-JPEG-Lite-2.15.0-Modenize-C.patch'
 *             environment, line  474:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/dev-perl/Tk-JPEG-Lite-2.15.0/Tk-JPEG-Lite-2.15.0-Modenize-C.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"
 *
 * If you need support, post the output of `emerge --info '=dev-perl/Tk-JPEG-Lite-2.15.0-r1::gentoo'`,
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22395

PostPosted: Tue Aug 27, 2024 11:52 am    Post subject: Reply with quote

How did you create /etc/portage/patches/dev-perl/Tk-JPEG-Lite-2.15.0/Tk-JPEG-Lite-2.15.0-Modenize-C.patch? There is a known issue that if you copy text from the reader view of a post, tabs are expanded into spaces, which results in broken patch files if the patch includes tabs, as this one does. To avoid that, choose to quote the original post, then copy the text from the edit composition box on the reply page. You can discard your composition page afterward, without posting.

The middle hunk has tabs, but their placement is not as critical, so patch might be able to recover from those being wrong. The first and third hunks have tabs closer to the changed line, and likely cannot recover from having tabs expanded into spaces.
Back to top
View user's profile Send private message
Skippy204
Guru
Guru


Joined: 09 May 2008
Posts: 347
Location: Colorado, USA

PostPosted: Wed Aug 28, 2024 3:22 pm    Post subject: Reply with quote

Hu wrote:
How did you create /etc/portage/patches/dev-perl/Tk-JPEG-Lite-2.15.0/Tk-JPEG-Lite-2.15.0-Modenize-C.patch? There is a known issue that if you copy text from the reader view of a post, tabs are expanded into spaces, which results in broken patch files if the patch includes tabs, as this one does. To avoid that, choose to quote the original post, then copy the text from the edit composition box on the reply page. You can discard your composition page afterward, without posting.

The middle hunk has tabs, but their placement is not as critical, so patch might be able to recover from those being wrong. The first and third hunks have tabs closer to the changed line, and likely cannot recover from having tabs expanded into spaces.


Your diagnosis is correct. That was how I created the file. Used your specified method and it worked.

Thank you. I will attempt to remember this for future applications.
Back to top
View user's profile Send private message
Skippy204
Guru
Guru


Joined: 09 May 2008
Posts: 347
Location: Colorado, USA

PostPosted: Wed Aug 28, 2024 3:24 pm    Post subject: Reply with quote

salahx wrote:
Actually, this one looks pretty easy to fix. Add this /etc/portage/patches/dev-perl/Tk-JPEG-Lite-2.15.0/Tk-JPEG-Lite-2.15.0-Modenize-C.patch:


Tell me if it works and I'll submit a PR.


It worked. Thank you very much.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum