[erlang-questions] failed to enable SMP support in otp_src_R12B-1

Raymond Xiong Raymond.Xiong@REDACTED
Thu Feb 21 08:19:02 CET 2008

On 02/20/08, Mikael Pettersson wrote:
> Raymond Xiong writes:
>  > Hello,
>  > 
>  > I have a Sun Ultra 40(a dual-core amd64 machine) which runs
>  > Solaris Nevada. I used to run otp_src_R12B-0 on it and had
>  > no problem in enabling SMP support in Erlang emulator(actually
>  > I did nothing for that, it was enabled automatically).
>  > 
>  > However, recently I upgrated the machine to Solaris Nevada
>  > latest build, which had some changes in sctp header files
>  > and caused otp_src_R12B-0 failed to compile. So I downloaded
>  > otp_src_R12B-1, configured and compiled it. But this time
>  > I couldn't enable SMP support, even if I configured it
>  > explicitly with SMP support:
>  > 
>  >    $ CPPFLAGS=-I/usr/include/gd2 ./configure --prefix=/myroot \
>  >      --enable-smp-support --enable-threads
>  > 
>  >    (I specified CPPFLAGS because libgd header files were placed 
>  >    under /usr/include/gd2 on Solaris)
>  > 
>  > Has anyone encountered the same issue?
> You need to provide us with details about HOW it failed.
> A complete log from ./configure and make would be a good start.


I did some more experiments on my machine and found the following

Scenario 1) 
  - configure with no "--enable-smp-support"
  - no smp support

Scenario 2)
  - confiure with "--enable-smp-support"
  - have smp support 

Scenario 3)
  - configure with no "--enable-smp-support"
  - gmake && gmake install
  - re-configure with "--enable-smp-support"
  - gmake && gmake install
  - still no smp support

Scenario 4)
  - configure with no "--enable-smp-support"
  - gmake && gmake install
  - gmake clean
  - re-configure with "--enable-smp-support"
  - gmake && gmake install
  - have smp support

The only difference between scenario 3 and scenario 4 is 
the call of "gmake clean" before re-configuration. I didn't
realize it's necessary before(I had thought after
re-configuration every thing will be rebuilt. But it seemed
that's not the case. Is it correct?). 

I also have a question on scenario 1 and scenario 2. From
my testing result, "--enable-smp-support" must be specified
explicitly on my machine. But it was said in README that this
feature is detected automaticaly, is it ture?

BTW, I wonder how default values of these features(ie. SMP) 
are defined? From my understanding, for each target(OS/platform)
a profile will be created, which will be used by Makefile
in all subdirs. On my machine, that file is 
make/i386-pc-solaris2.11/otp.mk. I see "HIPE_ENABLED" in this
file, but there is no variables like "SMP_ENABLED". 


More information about the erlang-questions mailing list