<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>94090</bug_id>
          
          <creation_ts>2005-05-26 08:22 0000</creation_ts>
          <short_desc>dev-lang/erlang 10.2.0 build failure on sparc</short_desc>
          <delta_ts>2005-07-02 12:19:35 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>Sparc</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mkennedy@gentoo.org</reporter>
          <assigned_to>lang-misc@gentoo.org</assigned_to>
          <cc>creideiki+gentoo-bugzilla@lysator.liu.se</cc>
    
    <cc>sparc@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>mkennedy@gentoo.org</who>
            <bug_when>2005-05-26 08:22:33 0000</bug_when>
            <thetext>cd erts/emulator &amp;&amp; ERL_TOP=/var/tmp/portage/erlang-10.2.0/work/otp_src_R10B_2004-10-05 make generate depend
make[1]: Entering directory `/var/tmp/portage/erlang-10.2.0/work/otp_src_R10B_2004-10-05/erts/emulator&apos;
make -f sparc64-unknown-linux-gnu/Makefile generate
make[2]: Entering directory `/var/tmp/portage/erlang-10.2.0/work/otp_src_R10B_2004-10-05/erts/emulator&apos;
make[2]: sparc64-unknown-linux-gnu/Makefile: No such file or directory
make[2]: *** No rule to make target `sparc64-unknown-linux-gnu/Makefile&apos;.  Stop.make[2]: Leaving directory `/var/tmp/portage/erlang-10.2.0/work/otp_src_R10B_2004-10-05/erts/emulator&apos;
make[1]: *** [generate] Error 2
make[1]: Leaving directory `/var/tmp/portage/erlang-10.2.0/work/otp_src_R10B_2004-10-05/erts/emulator&apos;
make: *** [depend] Error 2

!!! ERROR: dev-lang/erlang-10.2.0 failed.
!!! Function src_compile, Line 39, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mkennedy@gentoo.org</who>
            <bug_when>2005-05-26 08:22:58 0000</bug_when>
            <thetext>Portage 2.0.51.19 (default-linux/sparc/sparc64/2005.0, gcc-3.3.5,
glibc-2.3.3.20040420-r2, 2.4.30-sparc sparc64)
=================================================================
System uname: 2.4.30-sparc sparc64 sun4u
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar  4 2005, 20:27:10)]
dev-lang/python:     2.3.4-r1
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.5, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.23
ACCEPT_KEYWORDS=&quot;sparc ~sparc&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-O2 -mcpu=ultrasparc&quot;
CHOST=&quot;sparc-unknown-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-O2 -mcpu=ultrasparc&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoaddcvs autoconfig ccache distlocks sandbox strict&quot;
GENTOO_MIRRORS=&quot;ftp://gentoo.ccccom.com http://gentoo.osuosl.org/
http://mirror.datapipe.net/gentoo http://gentoo.mirrors.tds.net/gentoo&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;sparc arts avi berkdb bitmap-fonts crypt cups dlloader encode esd fbcon
foomaticdb fortran gcc64 gd gdbm gif gnome gpm gtk gtk2 imlib jpeg kde libwww
mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png
python qt readline sdl spell ssl tcpd truetype truetype-fonts type1-fonts xml2
xmms xv zlib userland_GNU kernel_linux elibc_glibc&quot;
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>creideiki+gentoo-bugzilla@lysator.liu.se</who>
            <bug_when>2005-05-27 05:28:23 0000</bug_when>
            <thetext>It seems that AMD64 has had the same problem, so I just copied that solution
into the patch below, which works on my Ultra 10. I don&apos;t have any Sparc32
systems available, so I don&apos;t know what will happen on them, but I at least
don&apos;t think this patch will introduce any new problems there.

--- erlang-10.2.0.ebuild.orig   2005-05-27 14:21:25.000000000 +0200
+++ erlang-10.2.0.ebuild        2005-05-27 13:49:02.000000000 +0200
@@ -33,8 +33,9 @@
        [ &quot;`gcc-fullversion`&quot; == &quot;3.3.3&quot; ] &amp;&amp; filter-mfpmath sse
        addpredict /dev/pty # Bug #25366
 
-       #erlang configure seems to &quot;misdetect&quot; CHOST on amd64
+       #erlang configure seems to &quot;misdetect&quot; CHOST on amd64 and Sparc
        [ &quot;${ARCH}&quot; = &quot;amd64&quot; ] &amp;&amp; CHOST=&quot;x86_64-unknown-linux-gnu&quot;
+       [ `uname -m` = &quot;sparc64&quot; ] &amp;&amp; CHOST=&quot;sparc64-unknown-linux-gnu&quot;
 
        econf --enable-threads || die
        make || die</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-07-02 12:01:12 0000</bug_when>
            <thetext>no, that&apos;s a crappy &apos;fix&apos; as is the current amd64 solution

the reason for this is the build system doesnt setup TARGET properly

configure.in sets TARGET to $host which comes from --host=... and this value is
recorded in the toplevel Makefile ...

when the generate target is run in the toplevel Makefile, it drops all settings
and changes to erts/emulator which sources make/run_make.mk which sources
make/target.mk which goes &apos;TARGET is not set, lets guess at it using
config.guess&apos; which then produces the garbage value &apos;sparc64-unknown-linux-gnu&apos;
and &apos;x86_64-unknown-linux-gnu&apos;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-07-02 12:19:35 0000</bug_when>
            <thetext>ok, 10.2.0 has a small patch to fix the issue

e-mailed fix upstream too
Makefile.in:
 # This should be set to the target &quot;arch-vendor-os&quot;
-TARGET  = @TARGET@
+export TARGET  = @TARGET@</thetext>
          </long_desc>
      
    </bug>

</bugzilla>