GNU bug report logs - #42675
Solaris 11.3 x86_64 support

Previous Next

Package: emacs;

Reported by: noloader <at> gmail.com

Date: Sun, 2 Aug 2020 14:01:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42675 in the body.
You can then email your comments to 42675 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#42675; Package emacs. (Sun, 02 Aug 2020 14:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to noloader <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 02 Aug 2020 14:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jeffrey Walton <noloader <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Solaris 11.3 x86_64 support
Date: Sun, 2 Aug 2020 10:00:35 -0400
Hi Everyone,

I'm submitting this one because etc/MACHINES says Solaris is supported.

I'm building on Solaris 11.3 using x86_64 per [1]. I use
'--build=x86_64-sun-solaris' because Autoguess chooses 32-bit instead
of 64-bit (even with CFLAGS and CXXFLAGS including -m64).

  $ ./configure ...
  checking for xcrun... no
  checking for GNU Make... gmake
  checking build system type... x86_64-sun-solaris2
  checking host system type... x86_64-sun-solaris2
  configure: error: Emacs does not support 'x86_64-sun-solaris2' systems.
  If you think it should, please send a report to bug-gnu-emacs <at> gnu.org.

But according to etc/MACHINES:

  $ cat etc/MACHINES
  ...

  ** Solaris

    On Solaris it is also possible to use either GCC or Solaris Studio
    to build Emacs, by pointing ./configure to the right compiler ...

[1] https://docs.oracle.com/cd/E37838_01/html/E66175/appendixb.html




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42675; Package emacs. (Sun, 02 Aug 2020 14:19:02 GMT) Full text and rfc822 format available.

Message #8 received at 42675 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Jeffrey Walton <noloader <at> gmail.com>
Cc: 42675 <at> debbugs.gnu.org
Subject: Re: bug#42675: Solaris 11.3 x86_64 support
Date: Sun, 02 Aug 2020 16:18:03 +0200
On Aug 02 2020, Jeffrey Walton wrote:

> I'm building on Solaris 11.3 using x86_64 per [1]. I use
> '--build=x86_64-sun-solaris'

You need to specify the exact solaris version you are building for.

> because Autoguess chooses 32-bit instead
> of 64-bit (even with CFLAGS and CXXFLAGS including -m64).

If you add -m64 to CC, not CFLAGS, then config.guess should do the right
thing.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42675; Package emacs. (Sun, 02 Aug 2020 15:13:02 GMT) Full text and rfc822 format available.

Message #11 received at 42675 <at> debbugs.gnu.org (full text, mbox):

From: Jeffrey Walton <noloader <at> gmail.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 42675 <at> debbugs.gnu.org
Subject: Re: bug#42675: Solaris 11.3 x86_64 support
Date: Sun, 2 Aug 2020 11:12:02 -0400
On Sun, Aug 2, 2020 at 10:18 AM Andreas Schwab <schwab <at> linux-m68k.org> wrote:
>
> On Aug 02 2020, Jeffrey Walton wrote:
>
> > I'm building on Solaris 11.3 using x86_64 per [1]. I use
> > '--build=x86_64-sun-solaris'
>
> You need to specify the exact solaris version you are building for.

Thanks Andreas.

I don't think that's the case. The Autotools docs say the triplet is
cpu-vendor-os. They don't say anything about a version number.[1]
There is no "solaris2" os. It is called 'Solaris'. Because of
Autotools name mangling a configure typically matches it to
'solaris*'.

[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Specifying-Target-Triplets.html

> > because Autoguess chooses 32-bit instead
> > of 64-bit (even with CFLAGS and CXXFLAGS including -m64).
>
> If you add -m64 to CC, not CFLAGS, then config.guess should do the right
> thing.

If I add -m64 to the compiler, then it breaks other packages. I don't
think that is fair to other packages that do things as expected.

But stepping back, there is no need to guess. I told the system what
to use in the --build.

Of the 100+ packages I build regularly, only Emacs has this problem.
I'm pretty sure the Emacs configure script is the problem in this
case.

The user's job is to set the environment. If I don't set the
environment properly then that's my fault and the configure script
should die. The flip side of that is, stop being clever in the script.
Just do what you are told and things will work well.

Jeff




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42675; Package emacs. (Sun, 02 Aug 2020 18:46:01 GMT) Full text and rfc822 format available.

Message #14 received at 42675 <at> debbugs.gnu.org (full text, mbox):

From: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
To: noloader <at> gmail.com
Cc: 42675 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#42675: Solaris 11.3 x86_64 support
Date: Sun, 02 Aug 2020 11:45:27 -0700
FWIW, I just looked at Emacs on 2 Solaris systems that I have access to.

One system is a SPARC box running S11.3.  It has Emacs 24.3, which was
built for sparc-sun-solaris2.11.

The other system is an x86 box running S11.4.  It has Emacs 26.3, which
was built for x86_64-pc-solaris2.11.

Recently I've not had much luck building Emacs using the Studio
compiler.  I don't know if it's a problem with Emacs, Studio, or
Solaris, and I haven't had the time to look into it.

regards,
mike




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42675; Package emacs. (Thu, 06 Aug 2020 01:06:01 GMT) Full text and rfc822 format available.

Message #17 received at 42675 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jeffrey Walton <noloader <at> gmail.com>
Cc: 42675 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>
Subject: Re: bug#42675: Solaris 11.3 x86_64 support
Date: Wed, 5 Aug 2020 18:05:17 -0700
[Message part 1 (text/plain, inline)]
> The Autotools docs say the triplet is
> cpu-vendor-os. They don't say anything about a version number.

Nevertheless Andreas is right, as the 'os' string is 'solaris2.11' in Autoconf 
triplets. I disagreed with this kind of 'os' string when it was introduced in 
the 1990s and I still think it's confusing, but it's been that way for decades 
and it's not likely to be worth changing now.

Also, Andreas is right that the best way to build 64-bit Emacs executables on 
Solaris is to configure with CC='gcc -m64' or CC='cc -m64' or whatever. This has 
long been documented in Emacs's etc/MACHINES file, and this method works for 
many other GNU packages as well. (If method doesn't work on some other packages, 
I suggest the problem lies with those other packages. :-)

That being said, it would be helpful for Emacs to cater to nonstandard 'os' 
strings like plain 'solaris', so I installed the attached patch into Emacs 
master to do that. This should appear in Emacs 28 whenever that comes out, but 
it's too risky to slide into Emacs 27 so when building that I suggest using 
'solaris2.11'.
[0001-Simplify-Solaris-port.patch (text/x-patch, attachment)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Thu, 06 Aug 2020 23:03:02 GMT) Full text and rfc822 format available.

Notification sent to noloader <at> gmail.com:
bug acknowledged by developer. (Thu, 06 Aug 2020 23:03:02 GMT) Full text and rfc822 format available.

Message #22 received at 42675-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
Cc: noloader <at> gmail.com, 42675-done <at> debbugs.gnu.org
Subject: Re: bug#42675: Solaris 11.3 x86_64 support
Date: Thu, 6 Aug 2020 16:02:07 -0700
> Recently I've not had much luck building Emacs using the Studio
> compiler.  I don't know if it's a problem with Emacs, Studio, or
> Solaris, and I haven't had the time to look into it.

For what it's worth, I built and ran Emacs master with Oracle Developer Studio 
12.6 on Solaris 10 sparc with these commands:

../emacs-28.0.50/configure CC=cc --with-jpeg=ifavailable --with-png=ifavailable 
--with-gif=ifavailable --with-tiff=ifavailable --with-gnutls=ifavailable
gmake

I needed the "ifavailable" options because those libraries aren't available on 
Solaris 10.

If you're still having problems with Studio please file a bug report when you 
have the time. I did just now fix a problem on OpenIndiana (which needs 
"#include <gmp/gmp.h>" not "#include <gmp.h>") so if that's what you ran into it 
should be fixed now.

The original bug that prompted this bug report seems to have been fixed so I'm 
taking the liberty of marking this bug as done.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 04 Sep 2020 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.