ac_cv_cflags_warn_all in unix configure script

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

ac_cv_cflags_warn_all in unix configure script

stes
 

I'm giving it a try to compile OpenSmalltalk with the Sun C compiler on
Solaris.

In the OpenSmalltalk sources, under platforms/unix/config/configure

in the configure script there is some code to select "maximum warnings" for
the C compiler

when configuring with the Sun C compiler that part of the configure script
does not work.

It selects "-warn all" when automatic configuration is used, but the cc
compiler later on complains because this option does not exist, it is in
fact interpreted as a way to pass '-r' and '-n' via '-wa' to the linker.

As a solution or workaround if you like,  what works is :  ./configure
*ac_cv_cflags_warn_all="-pedantic"*

So the following configure line works

  $ ../../../platforms/unix/config/configure --without-npsqueak
--with-vmversion=5.0 --with-src=spursrc TARGET_ARCH=-m32
*ac_cv_cflags_warn_all="-pedantic"* CFLAGS=-g -O2 -DNDEBUG -DDEBUGVM=0
-DCOGMTVM=0

and the compilation starts.





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

Re: ac_cv_cflags_warn_all in unix configure script

K K Subbu
 
On 27/03/20 2:49 PM, stes wrote:
> It selects "-warn all" when automatic configuration is used, but the cc
> compiler later on complains because this option does not exist, it is in
> fact interpreted as a way to pass '-r' and '-n' via '-wa' to the linker.
The old trunk image used cmake. Opensmalltalk uses autoconf.

The configure script is autogenerated by Gnu Autoconf from configure.ac
for gnu toolchain. You may need to generate one for Solaris C toolchain
starting with autoscan to generate a configure.ac and then using
autoconf to get configure.

  https://en.wikipedia.org/wiki/Configure_script

> As a solution or workaround if you like,  what works is :  ./configure
> *ac_cv_cflags_warn_all="-pedantic"*
This eliminates many other warning flags :-(

HTH .. Subbu
Reply | Threaded
Open this post in threaded view
|

Re: ac_cv_cflags_warn_all in unix configure script

stes
 

Well it is not clear to me why there is "automatic detection" of "maximum
warning flags" in the configure script anyway.

This could be given as CFLAGS on the configure command line, I suppose.

In any case that part of the configure script is not working on C Studio,
but the workaround I posted is simple and easy , just set
ac_cv_cflags_warn_all on the command line for configure.

The configure works in that case and the compile fails then later on

"./oscogvm/platforms/Cross/vm/sqAtomicOps.h", line 219: *#error: atomic
access of 64-bit variables not yet defined for this platform*
cc: acomp failed for ./oscogvm/platforms/Cross/vm/sqExternalSemaphores.c

But I didn't look into that yet.




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

Re: ac_cv_cflags_warn_all in unix configure script

stes
 

Ah, I think I see your point.

The configure.ac script has no code for "ac_cv_cflags_warn_all".

But I can't run 'autoconf' myself again

bash-4.4$ autoconf configure.ac
configure.ac:33: error: Autoconf version 2.69 or higher is required






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

Re: ac_cv_cflags_warn_all in unix configure script

stes
 

In any case , the configure script , as generated by autoconf on whatever
platform is used to generate it,
and as it is in the GIT repository is working fine.

I just set the ac_cv_cflags_warn_all as defined on the command line, and the
entire configure script ran.



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

Re: ac_cv_cflags_warn_all in unix configure script

tty
 

Great work.

Are you on OpenSolaris 64 bit? 

if so, I have an Ubuntu boot install option I look forward to replacing with something fun.

Thanks for your work.

---- On Fri, 27 Mar 2020 07:40:50 -0400 stes <[hidden email]> wrote ----



In any case , the configure script , as generated by autoconf on whatever
platform is used to generate it,
and as it is in the GIT repository is working fine.

I just set the ac_cv_cflags_warn_all as defined on the command line, and the
entire configure script ran.



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


Reply | Threaded
Open this post in threaded view
|

Re: ac_cv_cflags_warn_all in unix configure script

stes
 

I could try both 32 bit and 64 bit, but based on the observation that the
old Squeakvm "classic" from subversion still compiles fine 100% (with C
Studio) on Solaris in 32bit, I start with the opensmalltalk also in 32bit.
Based on the idea that the vm has worked in the past (and is still working),
the main goal being here just to launch the 5.x Squeak image.





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

Re: ac_cv_cflags_warn_all in unix configure script

David T. Lewis
 
Hello stes,

On Fri, Mar 27, 2020 at 08:18:30AM -0500, stes wrote:
>  
>
> I could try both 32 bit and 64 bit, but based on the observation that the
> old Squeakvm "classic" from subversion still compiles fine 100% (with C
> Studio) on Solaris in 32bit, I start with the opensmalltalk also in 32bit.
> Based on the idea that the vm has worked in the past (and is still working),
> the main goal being here just to launch the 5.x Squeak image.
>

Off topic, but can you confirm that you were able to build a working VM
for Solaris with ths sources from squeakvm.org Subversion? The version
of the VM would be 4.16.7-3775.

Just keeping track of what works and what doesn't.

Thanks!
Dave

Reply | Threaded
Open this post in threaded view
|

Re: ac_cv_cflags_warn_all in unix configure script

stes
 

Yes, I checked out the subversion sources from squeakvm and they compile
with the SUNpro C compiler.

That is the build32 succeeds and the build64 almost succeeds, but I didn't
try further on the build64 because it appears that "squakvm" classic only
can run 4.x squeak images.

I had to make one modification to make the build32 work.



bash-4.4$ svn diff platforms/
Index: platforms/unix/vm/sqUnixMain.c
===================================================================
--- platforms/unix/vm/sqUnixMain.c (revision 3775)
+++ platforms/unix/vm/sqUnixMain.c (working copy)
@@ -447,7 +447,7 @@
  return  dpy->winSystemName();
       case 1006:
  /* vm build string */
- return VM_BUILD_STRING;
+ return "VM_SunStudio";
       default:
  if ((id - 2) < squeakArgCnt)
   return squeakArgVec[id - 2];
bash-4.4$ svn diff src      


the reason is that the VM_BUILD_STRING is defined using a symbol __VERSION__
that is not set I think by the SUNpro C compiler, or at least not by
default.

So to get the build working I just replaced VM_BUILD_STRING by
"VM_SunStudio".

Then it built (in 32bit) 100% and it launches 4.x Squeak images fine.

The 64bit build for squeakvm classic currently fails at 97% on the file
sqUnixSoundSun.c
 line 197: identifier redeclared: sound_AvailableSpace


but the squeakvm classic is not running squeak 5.x images, so I stopped
looking at the squeakvm classic for now.

The squeakvm classic is compiling fine on Solaris, it can be seen that this
has been done in the past as well ... there are binary packages for Solaris
on the squeakvm.org website of course, so it's not so much of a surprise.






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

Re: ac_cv_cflags_warn_all in unix configure script

stes
 

confirm that

bash-4.4$ file lib/squeak/4.16.7-3775/squeakvm
lib/squeak/4.16.7-3775/squeakvm: ELF 32-bit LSB executable 80386 Version 1
[SSE2 SSE], dynamically linked, not stripped


was able to run Squeak 4.6 and unix 4.10 image from the squeakvm site with
the above binary which I compiled myself





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

Re: ac_cv_cflags_warn_all in unix configure script

K K Subbu
In reply to this post by stes
 
On 27/03/20 10:33 PM, stes wrote:
> the reason is that the VM_BUILD_STRING is defined using a symbol __VERSION__
> that is not set I think by the SUNpro C compiler, or at least not by
> default.

You can pass such build specific defines and other parameters to
configure using build/Makefile. See cmake/Makefile.example

Regards .. Subbu
tty
Reply | Threaded
Open this post in threaded view
|

Re: ac_cv_cflags_warn_all in unix configure script

tty
In reply to this post by stes
 
WOOT!!!!!


---- On Fri, 27 Mar 2020 13:08:15 -0400 stes <[hidden email]> wrote ----



confirm that

bash-4.4$ file lib/squeak/4.16.7-3775/squeakvm
lib/squeak/4.16.7-3775/squeakvm:    ELF 32-bit LSB executable 80386 Version 1
[SSE2 SSE], dynamically linked, not stripped


was able to run Squeak 4.6 and unix 4.10 image from the squeakvm site with
the above binary which I compiled myself





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

Reply | Threaded
Open this post in threaded view
|

Re: ac_cv_cflags_warn_all in unix configure script

David T. Lewis
In reply to this post by stes
 
On Fri, Mar 27, 2020 at 12:08:15PM -0500, stes wrote:

>  
>
> confirm that
>
> bash-4.4$ file lib/squeak/4.16.7-3775/squeakvm
> lib/squeak/4.16.7-3775/squeakvm: ELF 32-bit LSB executable 80386 Version 1
> [SSE2 SSE], dynamically linked, not stripped
>
>
> was able to run Squeak 4.6 and unix 4.10 image from the squeakvm site with
> the above binary which I compiled myself
>

Thank you for confirming,
Dave