PR portability

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

PR portability

Tobias Pape
 
Hi

do anyone has issues with this PR?
        https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/481

(Discussion happened over at squeak-dev)

Best regards
        -Tobias

Reply | Threaded
Open this post in threaded view
|

Re: PR portability

stes
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Other UNIX platforms, such as Solaris perhaps, could be impacted.

I haven't tested these changes yet, I could give it a try to test this ...
(this will take some time).

Let me know if there is interest in testing.

By the way there is one configure issue that I reported with Squeak V5.

In order to run the configure script I have to use the command line:

   configure ac_cv_cflags_warn_all=""

I think this is a "known" issue with the ax_cflags_warn_all.m4 file.

The ax_cflags_warn_all.m4 could be updated as well,

see:

http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commit;h=b259e09962a25781f614172831957e5dedb0d7ec

it reads there:

"ax_cflags_warn_all.m4: Rewrite AX_FLAGS_WARN_ALL to use AX_COMPILER_VENDOR

Using AX_COMPILER_VENDOR allows significantly more robust selection of
appropriate compiler flags.  In the old code, for example, the Sun
(Oracle) Compiler Suite would accept Intel's "-warn all" detection, with
rather disastrous results.

All current compiler flags are incorporated into the new code without
modification."

Can you perhaps also try to update the ax_cflags_warn_all.m4 macro
and regenerate the configure ?

Regards,
David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJejYNlAAoJEAwpOKXMq1ManqcIAIICJ6s1M0OpeW41HsJBuVgB
kOcvdRbDjFvuaseu9UUi4ZZDTEMRRS615CukBkm5Zy/D3R2txUYoW7Ah7MhgQ3an
VfDjB13SCzVo0LOCCEmTf+WjTGNtgS9XiZNHbfICL/TUUyXxRuDbg9PfuNGZHoLB
iDplvxlnwcWhWftwwxzHOE/zLbIgcYx5F9kmm3M5RRwpNUnGE+NYI4485qCR3Xvt
cevbtssCNjAxGCTcpZK1w+We7PER1gTqKJjmCRmx0AHzyTMpNlvjHF60/7+bLSf5
HIMF5orFT1iIRaie5aHu3tPUcKAtu9zBQL5YmD16ZhgCuQwaNKH28Lgbo0Arti0=
=GU1S
-----END PGP SIGNATURE-----




--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: PR portability

stes
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


The file ax_cflags_warn_all.m4 is in the opensmalltalk distribution in:

platforms/unix/config/ax_cflags_warn_all.m4

so it could be updated, please, and generate configure again  ?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJejYUNAAoJEAwpOKXMq1MaRlgH/iBUpAglYb88mOKFXRR73uFE
PW/HX02jZE4MYdKFz5ERUjTz4OJIZf8+25Qv2eCrMinnInOd+F9FnkxilnbsIGij
/HTqqD+ODb/5rp0XzDQh5Yroy2pKiTt9B14O/T+9PaalumGQLEv2LV1w3S3F7Sj+
ueW7/jPb4+PWBSuOFDyjVxr420Zo6AhOZn467VPKijAfZ4TqR7Xz6DlOnK+NZ7ei
TMjAWl97XAxuiiVgWqGhe6XuLqvKm0qrV5z9LOJOpIFkxtp7aWQG5MV0JgpW858a
mOdm53U/GIP+OhPN1iS3OtxY3bzD0dz5FoY6s3cX3e8ECW664NAyIG7R5IRoBBA=
=I1gs
-----END PGP SIGNATURE-----




--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: PR portability

stes
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


An up-to-date implementation with a fix is at:

http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_cflags_warn_all.m4

The opensmalltalk config directory still has an old copy of the file with
the incorrect code.

Regards,
David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJejuKiAAoJEAwpOKXMq1MaVfsH+gI5XkDkrW4MPirLnhiheqzT
V79GOdknnUCKm3xjTWuX0XdBfc0gUrVbZgjIwGx06+LFs4FLsl0h8CXLVzXeW6bS
QCDMrg4zmHfheCRFsNaYJPnRqWsWa9tLeX2cBbik8JXrmkbleYXZ2Prf99HM3Znb
6JMkYd6rgk0OXoKEYKZMYSEMrAJk4o1D7fN52ujnEc5CQlEccjYFkklyXOX4+IoM
P6xNXG+CKfLPUyGOOGWjxt36y1d7EILtKgcpTed5T/EeHyQKzkx2DzoPAzbs90kN
F5scNSWRnNI9AnX6TK9VOUroSGKwdGfGqvw4YhBXZPfnrrJs23Cx4VsZptdtyYM=
=bIT5
-----END PGP SIGNATURE-----




--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: PR portability

Eliot Miranda-2
In reply to this post by Tobias Pape
 
Hi Tobias,


> On Apr 7, 2020, at 9:52 PM, Tobias Pape <[hidden email]> wrote:
>
> 
> Hi
>
> do anyone has issues with this PR?

Not me. This seems like good work and Shaping’s observations seen valid.  If the tests pass my vote would be to integrate asap.

>    https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/481
>
> (Discussion happened over at squeak-dev)
>
> Best regards
>    -Tobias
>
Reply | Threaded
Open this post in threaded view
|

Re: PR portability

Eliot Miranda-2
 


> On Apr 9, 2020, at 9:38 AM, Eliot Miranda <[hidden email]> wrote:
>
> Hi Tobias,
>
>
>> On Apr 7, 2020, at 9:52 PM, Tobias Pape <[hidden email]> wrote:
>>
>> 
>> Hi
>>
>> do anyone has issues with this PR?
>
> Not me. This seems like good work and Shaping’s observations seen valid.

I meant stes’ observations.

>  If the tests pass my vote would be to integrate asap.
>
>>   https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/481
>>
>> (Discussion happened over at squeak-dev)
>>
>> Best regards
>>   -Tobias
>>
Reply | Threaded
Open this post in threaded view
|

Re: PR portability

stes
 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


It would help portability if the M4 macros of the configure script would be
updated.  For example in my case I could conveniently switch between SunPro
cc
and GNU cc (gcc) by running configure, and it would then autodetect the warn
all flag.

I can currently compile on Solaris using either SunPro or gcc, but
the autodetection in

   ./platforms/unix/config/ax_cflags_warn_all.m4

is not working.

The opensmalltalk config directory could be updated like this:

in

    ./platforms/unix/config/acinclude.m4

add:

m4_include([ax_prepend_flag.m4])
m4_include([ax_require_defined.m4])
m4_include([ax_compiler_vendor.m4])
m4_include([ax_cflags_warn_all.m4])

This could be done perhaps by copying from the latest autoconf-archive:

  ax_prepend_flag.m4 ax_require_defined.m4 ax_compiler_vendor.m4
ax_cflags_warn_all.m4

into the opensmalltalk config directory and then running the Makefile ...

This change will benefit all platforms.

Regards,
David Stes


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJelKFvAAoJEAwpOKXMq1MayrUIAIdyHtvsoR1zxt0RY8CkjA/h
Uf8BHi0X5CxCqjtvAeXezY8SgAkkAA4MlurAdBdAsqHonqVa/As4HAXtcMEamqPf
vFOmjsasr34NN//TcL8ji2LhFawLr/4Jn1808YWDKd8xsp2no+SZfhu9MeutOTrv
zuSbmWYDGPOorO5yPvUykQZ30+67mXuWuf6eW70cVTW3COP8lF6J+01jLVXLgnQY
pAkc3yEH17f1o4e4LRzi0kcHcOe8PLVnb4GBNJCyQuIMAJ2MJNbHD9Oqi+Foeqm0
KYP6aZ74Sie4fcllr0RHQNiU0RYIYhS6T2LmwuHd0B7e70HV0Wp2Uge6N5V2dik=
=3bFy
-----END PGP SIGNATURE-----




--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: PR portability

Tobias Pape
 
Hi David

> On 13.04.2020, at 19:31, stes <[hidden email]> wrote:
>
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
>
> It would help portability if the M4 macros of the configure script would be
> updated.  For example in my case I could conveniently switch between SunPro
> cc
> and GNU cc (gcc) by running configure, and it would then autodetect the warn
> all flag.
>
> I can currently compile on Solaris using either SunPro or gcc, but
> the autodetection in
>
>   ./platforms/unix/config/ax_cflags_warn_all.m4
>
> is not working.
>
> The opensmalltalk config directory could be updated like this:
>
> in
>
>    ./platforms/unix/config/acinclude.m4
>
> add:
>
> m4_include([ax_prepend_flag.m4])
> m4_include([ax_require_defined.m4])
> m4_include([ax_compiler_vendor.m4])
> m4_include([ax_cflags_warn_all.m4])
>
> This could be done perhaps by copying from the latest autoconf-archive:
>
>  ax_prepend_flag.m4 ax_require_defined.m4 ax_compiler_vendor.m4
> ax_cflags_warn_all.m4
>
> into the opensmalltalk config directory and then running the Makefile ...


I updated a bunch, care to see if it helps? :)

Best regards
        -Tobias

>
> This change will benefit all platforms.
>
> Regards,
> David Stes
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQEcBAEBCAAGBQJelKFvAAoJEAwpOKXMq1MayrUIAIdyHtvsoR1zxt0RY8CkjA/h
> Uf8BHi0X5CxCqjtvAeXezY8SgAkkAA4MlurAdBdAsqHonqVa/As4HAXtcMEamqPf
> vFOmjsasr34NN//TcL8ji2LhFawLr/4Jn1808YWDKd8xsp2no+SZfhu9MeutOTrv
> zuSbmWYDGPOorO5yPvUykQZ30+67mXuWuf6eW70cVTW3COP8lF6J+01jLVXLgnQY
> pAkc3yEH17f1o4e4LRzi0kcHcOe8PLVnb4GBNJCyQuIMAJ2MJNbHD9Oqi+Foeqm0
> KYP6aZ74Sie4fcllr0RHQNiU0RYIYhS6T2LmwuHd0B7e70HV0Wp2Uge6N5V2dik=
> =3bFy
> -----END PGP SIGNATURE-----



Reply | Threaded
Open this post in threaded view
|

Re: PR portability

stes
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Yes, I can see that now on the Cog branch there is:

 platforms/unix/config/ax_compiler_vendor.m4
 platforms/unix/config/ax_prepend_flag.m4

and best of all:

 ax_cflags_warn_all.m4

has now the GNU version of 2018:

   Copyright (c) 2008 Guido U. Draheim <[hidden email]>
   Copyright (c) 2010 Rhys Ulerich <[hidden email]>
   Copyright (c) 2018 John Zaitseff <[hidden email]>

so the old 2010 code is replaced by the 2018 version.

That's good news.

I'll give it a try ...

Basically this seems a good idea to update the m4 files;
I've tested myself whether "make configure" works (and it did for me,
on some systems with a recent autoconf/autotools).

In any case hopefully this doesn't create new problems,
as the "configure" script applies to all UNIX/Linux systems ...

In any case, the old 2010  ax_cflags_warn_all.m4  file was a disaster for
the SunPRO C compiler, as it was using *incorrect* detection and wrong
flags,
so everything was broken unless manually overridden.

Thanks,

David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJeqnY6AAoJEAwpOKXMq1MarToIAKPDdWFH9Y3vt2l1Mo6NzytM
EfagGLr/+9uFDojMl2VVdSwAS0XQNAsmLGknwoUhQ1j2u3/HAcL1uLH7ZcsRkQJw
JnOOMd9p8+yT+Fwfxgd4wnjjsJQA6S74W6n5AbJ7/ZSf5T2dOgtZPa1hOzNhFO8N
IRc+XGERQYFi6fNq2MW+6muoAWKd2HToOsMK1piyNA7D3m83JwwdgKT8e4Qt4v5g
xhRwNavt4GPahMjXQWcGbWAyIIrfyd3ybu9n0vLICwAAniEdgmhrXl5YrkGY1frN
tkqyVftzRQyJNCn0ihfB5kLNTFe26Qy9pR34FuA5cOUcvdQJhdEBfuXNXwaRgS4=
=9ifz
-----END PGP SIGNATURE-----




--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: PR portability

stes
 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


With the updated script ax_cflags_warn_all.m4 and regenerated configure,
it works now:

checking for C compiler vendor... sun
checking whether make sets $(MAKE)... yes
checking whether we are using the GNU C compiler... (cached) no
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ISO C89... (cached) none needed
checking for cc option to accept ISO C99... none needed
checking CFLAGS for most reasonable warnings... -v

Note that it now uses the correct option -v which it automatically
configured.

And best of all the configuration process now completes automatically,
so in case of gcc it will use -Wall or something similar, and -v for Sun C.

Thanks,
David Stes


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJeqr0eAAoJEAwpOKXMq1Mai5sH/jWL3KEA8lSS4PYRUcebsLxb
Ftm03rz1AvYfomMR7AaDdIwLPs9GPxWrooxO0KxTA74QyMxeCEsH0YctjMTTsjtj
E5zHZ+jQkRUTce3+HsfPJGY9CdY0XFhKktJ+km+EYhib6VF1RcvhPYRJ7X8X6YMf
kwCDjH32EhLm/9EDXS6FFVW5p36PO4bhYfJQFJdmkqdSq5D9xcpY9UcfHMDGippW
V5oR/dihmUlGgkh934PZ5Zm64mxfLXVZdd73NhNo3Fm7vGPOfUB+1C0bwqP13siC
Ilr7UYCXHgDZgmT1zy28X3Ghmee9ZLZTrxkI/tkYrc2cQ/DDKqGmvXw9l79v5t0=
=vR6c
-----END PGP SIGNATURE-----




--
Sent from: http://forum.world.st/Squeak-VM-f104410.html