Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 652054 - =app-office/texmacs-1.99.6-r2 fails to build on 32-bit systems: guile_tm.cpp:374:29: error: invalid conversion from 'int*' to 'size_t* {aka unsigned int*}' [-fpermissive]
Summary: =app-office/texmacs-1.99.6-r2 fails to build on 32-bit systems: guile_tm.cpp:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 644606
  Show dependency tree
 
Reported: 2018-03-30 22:27 UTC by Sergei Trofimovich
Modified: 2018-04-15 14:52 UTC (History)
2 users (show)

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


Attachments
app-office-texmacs-1.99.6-r2-build.log (app-office-texmacs-1.99.6-r2-build.log,955.04 KB, text/x-log)
2018-03-30 22:27 UTC, Sergei Trofimovich
Details
texmacs-1.99.6-guile-size_t.patch (texmacs-1.99.6-guile-size_t.patch,724 bytes, patch)
2018-03-30 22:33 UTC, Sergei Trofimovich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich gentoo-dev 2018-03-30 22:27:24 UTC
Created attachment 526180 [details]
app-office-texmacs-1.99.6-r2-build.log

Failed to build on ppc as:

/dev/shm/portage/app-office/texmacs-1.99.6-r2/work/TeXmacs-1.99.6-src/src/Scheme/Guile/guile_tm.cpp: In function 'string tmscm_to_string(tmscm)':
/dev/shm/portage/app-office/texmacs-1.99.6-r2/work/TeXmacs-1.99.6-src/src/Scheme/Guile/guile_tm.cpp:374:29: error: invalid conversion from 'int*' to 'size_t* {aka unsigned int*}' [-fpermissive]
   char* _r= scm_scm2str (s, &len_r);
                             ^~~~~~
In file included from /usr/include/libguile.h:92:0,
                 from /dev/shm/portage/app-office/texmacs-1.99.6-r2/work/TeXmacs-1.99.6-src/src/Scheme/Guile/guile_tm.hpp:43,
                 from /dev/shm/portage/app-office/texmacs-1.99.6-r2/work/TeXmacs-1.99.6-src/src/Scheme/Guile/guile_tm.cpp:19:
/usr/include/libguile/strings.h:107:15: note:   initializing argument 2 of 'char* scm_to_locale_stringn(SCM, size_t*)'
 SCM_API char *scm_to_locale_stringn (SCM str, size_t *lenp);
               ^~~~~~~~~~~~~~~~~~~~~

My guess is it fails to detect size_t proto here:

 CHECK_C_SOURCE_COMPILES(  "#include <guile/gh.h>
  #include <libguile.h>
  void print_string (SCM s) {
    int len_r;
    char* r= gh_scm2newstr (s, &len_r); } int main() { return 0; }
 " _guile_str_size_test)

as C while complains permits 'int*' to 'size_t*' coercion.
Comment 1 Sergei Trofimovich gentoo-dev 2018-03-30 22:27:51 UTC
Portage 2.3.19 (python 3.5.4-final-0, default/linux/powerpc/ppc32/13.0/desktop/gnome/systemd, gcc-6.4.0, glibc-2.25-r10, 4.9.16-gentoo ppc)
=================================================================
System uname: Linux-4.9.16-gentoo-ppc-POWER8_-architected-,_altivec_supported-with-gentoo-2.4.1
KiB Mem:    24805420 total,   8648944 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 30 Mar 2018 09:15:01 +0000
Head commit of repository gentoo: f62e76a1e0202dcf55faa2b0fd9b21a1cd184dc8
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.5-r1::gentoo, 3.5.4-r1::gentoo, 3.6.3-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.9.6-r5::gentoo, 1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.28.1::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r10::gentoo
Repositories:

gentoo
    location: /bound/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 

ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe -fdiagnostics-show-option -frecord-gcc-switches"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /etc/omega.conf /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe"
DISTDIR="/bound/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict stricter test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j13 -l12"
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="/dev/shm"
USE="X a52 aac acl alsa apng berkdb big-endian bluetooth branding bzip2 cairo cdda cdr cli client colord corefonts crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam flac fortran gd gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm graph gstreamer gtk iconv introspection ipv6 jpeg kerberos lapack lcms ldap libkms libnotify libsecret mad mng modules mp3 mp4 mpeg nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pcre16 pcre32 pdf perl png policykit ppc ppds pulseaudio python qt3support qt5 readline sdl seccomp spell sqlite ssl startup-notification svg systemd tcpd threads tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xkb xml xmlwriter xv xvfb xvid zlib" ABI_PPC="32" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="fbdev glint mach64 mga nv r128 radeon savage trident dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Sergei Trofimovich gentoo-dev 2018-03-30 22:33:35 UTC
Created attachment 526182 [details, diff]
texmacs-1.99.6-guile-size_t.patch

Attached patch fixes build failure at least on ppc.
Comment 3 Thomas Deutschmann gentoo-dev Security 2018-04-12 20:30:52 UTC
Same test failure on x86. Patch fixes the problem.
Comment 4 Larry the Git Cow gentoo-dev 2018-04-15 14:52:50 UTC
The bug has been closed via the following commit(s):

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

commit dafbb1556e9b31a848134693e6a59cf41f95887b
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-04-15 14:52:05 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-04-15 14:52:43 +0000

    app-office/texmacs: fix build failure on 32-bit hosts, bug #652054
    
    C compiler compiles this code for bot int-based and size_t-based
    guile. C++ compiler does not (and is what used by texmacs).
    
    Closes: https://bugs.gentoo.org/652054
    Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../texmacs/files/texmacs-1.99.6-guile-size_t.patch | 21 +++++++++++++++++++++
 app-office/texmacs/texmacs-1.99.6-r2.ebuild         |  3 +++
 2 files changed, 24 insertions(+)