openjdk: jdk8u build error in Solaris 11 X86 - java-8

When i try to build openjdk 8u 64-bit from https://hg.openjdk.java.net/jdk8u/jdk8u/ in Solaris 11 X86:
Error:
configure: Resolving CC (as /opt/developerstudio12.6/bin/cc) failed, using /opt/developerstudio12.6/bin/cc directly.
checking resolved symbolic links for CC... /opt/developerstudio12.6/bin/cc
checking if CC is disguised ccache... no, keeping CC
configure: The C compiler (located as /opt/developerstudio12.6/bin/cc) does not seem to be the required Sun Studio compiler.
configure: The result from running with -V was: "cc: Studio 12.6 Sun C 5.15 SunOS_i386 2017/05/30" and with --version: "cc: Warning: Option --version passed to ld, if ld is invoked, ignored otherwise"
configure: error: Sun Studio compiler is required. Try setting --with-tools-dir.
configure exiting with result code 1
I've successfully built jdk8u 64-bit in Solaris 10 x86.
What compiler version does jdk8u support for building 64-bit in Solaris 11? Will that same compiler supported by Solaris 11. I see Solaris 11 supports developer studio from 12.4.
I would like to know whether we can build openjdk-jdk8u 64-bit version in Solaris 11.

Related

RedHat C compiler does not compile?

i am sitting since yesterday at the problem ruby to install on my redhat 7 system. I already have gcc cc and g++ installed. Also several restarts have not helped I always get the following errors :
[root#ld01 bin]# rbenv install 2.6.1
Downloading ruby-2.6.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.1.tar.bz2
Installing ruby-2.6.1...
BUILD FAILED (Red Hat Enterprise Linux Server 7.6 using ruby-build 20190130-4-g0e33b11)
Inspect or clean up the working tree at /tmp/ruby-build.20190227084942.17275
Results logged to /tmp/ruby-build.20190227084942.17275.log
Last 10 log lines:
/tmp/ruby-build.20190227084942.17275 /usr/bin
/tmp/ruby-build.20190227084942.17275/ruby-2.6.1 /tmp/ruby-build.20190227084942.17275 /usr/bin
checking for ruby... false
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking whether the C compiler works... no
configure: error: in `/tmp/ruby-build.20190227084942.17275/ruby-2.6.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
I think you'll need the config.log but where exactly can I find the log file ?
I'm guessing you've downloaded Ruby and are trying to install it over an existing version - if so, this can break things. If Ruby 2.5 will suffice, I suggest using the version available in RHEL as a Software Collection. Installation info is here.
Software Collections alongside the original Ruby version (used by the OS) so that nothing breaks.

How to accurately make configure script use the updated gcc version on CentOS?

I have followed instructions provided in other articles to fix the below issue but still doesn't appear to work for my system. I am trying to upgrade glibc to v2.27 on my CentOS 7.3 machine. I downloaded the package and running into the below compiler dependency during the configure script execution:
../configure --prefix=/opt/glibc-2.27
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
...
...
checking if gcc is sufficient to build libc... no
checking for nm... nm
checking for python3... no
checking for python... python
configure: error:
*** These critical programs are missing or too old: compiler
*** Check the INSTALL file for required versions.
So I upgraded my gcc and verified the upgraded version:
gcc --version
gcc (GCC) 8.2.0
I also have the following environment variable set in my bashrc:
export CC=/usr/local/bin/gcc
For some reason, the configure script still throws the same error based on which it appears that the upgraded gcc version isn't being used.
What am I missing?

Setting c++11 std for gcc in solaris 11

I am trying to install cmake on solaris machine by building its source code. In one of the steps we need to do "make" to build the source code. When I do a make I am getting below error
/json_reader.cpp:35:18: error: ‘snprintf’ is not a member of ‘std’
#define snprintf std::snprintf
This indicates that code is using c++11 std but gcc compiler uses c++98 std. I have gcc version 4.8.2 (GCC) in the solaris machine. As per my knowledge make is wrapper over gcc.
Question is: How to set CFLAGS for gcc globally so that when I do a "make" it directly uses c++ 11 std.

Installing image pgk on Octave on Mac OS X

I installed GNU Octave, version 4.2.0-rc2 on my Mac[0] using Homebrew[1].
But now I tried to install the image pkg[2].
I tried downloading it and then using this line:
"pkg install image-2.6.0.tar.gz"
Then I tried installing it with this line of code:
"pkg install -forge image"
Both resulted in the following output:
configure: error: *** A compiler with support for C++11 is required
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for octave... /usr/local/Cellar/octave/4.2.0-rc2/bin/octave-4.2.0-rc2
checking for mkoctfile... /usr/local/Cellar/octave/4.2.0-rc2/bin/mkoctfile-4.2.0-rc2
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ -std=gnu++11 accepts -g... yes
checking for clang++ -std=gnu++11 option to enable C++11 features... unsupported
pkg: error running the configure script for image.
error: called from
install at line 200 column 5
pkg at line 392 column 9
But I think I installed GCC correctly:
gcc -v
Has the following output:
Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin15.6.0/6.2.0/lto-wrapper
Ziel: x86_64-apple-darwin15.6.0
Konfiguriert mit: ../gcc-6.2.0/configure --enable-languages=c++,fortran --with-gmp=/usr/local
Thread-Modell: posix
gcc-Version 6.2.0 (GCC)
What is my mistake? Or what have i done wrong?
[1] http://wiki.octave.org/Octave_for_MacOS_X#Homebrew
[2] http://octave.sourceforge.net/image/index.html
[0] Macbook Specifications:
MacBook Pro (13-inch, Mid 2012)
2,5 GHz Intel Core i5
16 GB 1600 MHz DDR3
macOS Sierra (Version 10.12)
I had the exact same problem. Just download the older version 2.4.1 of image and installation should work as expected.
Download Link:
https://sourceforge.net/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/image-2.4.1.tar.gz/download

How to Compile 32-bit Apps on 64-bit RHEL?

I'm trying to compile a 32-bit C application on RHEL 7 64-bit using gcc 4.8. I'm getting a compiler error /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory. What do I need to do to get 32 bit apps compiled and linked?
To get RHEL 7 64-bit to compile gcc 4.8 32-bit programs, you'll need to do two things.
Make sure all the 32-bit gcc 4.8 development tools are completely installed:
sudo yum install glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 ncurses-devel.i686
Compile programs using the -m32 flag
gcc pgm.c -m32 -o pgm

Resources