How can I compile ruby 3.1.2 on powerpc64le-linux without disabling the jit features? - ruby

I think this is a bug I should report but will ask here first to see if I am missing something simple.
Firstly I need to build from source for various reasons including the fact that I don't have sudo access to the system I am trying to install on.
The system I am trying to compile on is a ppc64el system running RedHat 7 (3.10.0-1160.62.1.el7.ppc64le). I can successfully compile on a x86_64 system running the same version RedHat 7 (3.10.0-1160.62.1.el7.x86_64)
When I configure with the following, make completes fine, but if I remove the --disable-jit-support it fails with the following error.
Am I missing a setting on ./configure that can fix this?
./configure --enable-shared --enable-load-relative --disable-install-doc --prefix=$RUBY_PREFIX --exec-prefix=$RUBY_PREFIX/rh_ppc --disable-jit-support
building rb_mjit_header.h
rb_mjit_header.h updated
building .ext/include/powerpc64le-linux/rb_mjit_min_header-3.1.2.h
error in final header file:
In file included from /tmp/20220525-12786-q2ndz2.c:1:0:
/tmp/20220525-12786-vf3xbh.h:16627:1: error: multiple storage classes in declaration specifiers
__attribute__ ((__visibility__("default"))) extern
^
compilation terminated due to -Wfatal-errors.
make: *** [.ext/include/powerpc64le-linux/rb_mjit_min_header-3.1.2.h] Error 1

Related

Install xdebug failing on Mac

I am running MacOS Big Sur (ver 11.4) w/ PHP 7.4.19. I am trying to install xdebug w/ homebrew:
pecl install xdebug
but it fails with:
5 warnings and 4 errors generated.
make: *** [xdebug.lo] Error 1
ERROR: `make' failed
I tried downloading source and running make but I get the same error:
In file included from /usr/local/Cellar/php#7.4/7.4.19_1/include/php/Zend/zend.h:356:
/usr/local/Cellar/php#7.4/7.4.19_1/include/php/Zend/zend_operators.h:523:10: error:
'asm goto' constructs are not supported yet
__asm__ goto(
I have Googled to no avail. Has anyone else encountered this?
This is because of a mismatch between compilers. You didn't enough include information about which part was compiled by which compiler, but one of them was compiled by LLVM, and the other with GCC. This causes a mismatch.
You need to make sure that you're using the same compiler for both.

Where is the intel sgx psw and making intel sgx work with ubunut 18.04

I've tried following the intel instructions to install sgx, but it requires the sgx_linux_x64_psw_.bin file, which i cannot find anywhere. I've got the driver installer (sgx_linux_x64_driver_1.35.bin) and the sdk installer(sgx_linux_x64_sdk_2.10.100.2.bin), intel seems not to have a psw for linux? If so, how do i properly work with sgx? I tried simply executing the driver and sdk .bin files, but the sample code in the sdk would not compile (after make SGX_MODE=SIM), even after setting the sgxsdk directory to /opt/intel/sgxsdk. I'd get the following compile error:
/usr/bin/ld: warning: libsgx_uae_service_sim.so, needed by /opt/intel/sgxsdk/lib64/libsgx_urts_sim.so, not found (try using -rpath or -rpath-link)
/opt/intel/sgxsdk/lib64/libsgx_urts_sim.so: undefined reference to `get_launch_token'
collect2: error: ld returned 1 exit status
Makefile:235: recipe for target 'app' failed
make[1]: * [app] Error 1
make[1]: Leaving directory '/opt/intel/sgxsdk/SampleCode/SampleEnclave'
Makefile:180: recipe for target 'all' failed
make: * [all] Error 2
Any help with either issue would be much appreciated!
So at least in my case, it seems the issue was that I was A, using a virtual machine, which can ONLY run in simulation mode, so getting a fully working version of sgx is impossible. Secondly, I was using an outdated installation guide, for anyone else trying to use this stuff, make sure to get the installation guide from the intel download page along with the version you are downloading.
download source code from https://github.com/intel/linux-sgx, compile according to the instructions and then install psw.

Configuring wxWidgets for OS X 10.10

I am trying to build a program that relies on wxWidgets to run properly. I have the latest version of Xcode installed. I have tried building wxWidgets (both wxWidgets-3.0.2 and wxWidgets-2.9.4, the version originally used by the main program). However, in both cases, running the makefile for the main program gives the following error:
make: /Users/path to wxWidgets/wxWidgets-2.9.4/build-cocoa-release/utils/wxrc/wxrc: No such file or directory
As I understand it, I need to build wxrc to get my main program to build properly (I have tried this, but apparently some header files are missing). Is there any way to configure wxWidgets before this step that will automatically build wxrc as well? Or is that something I need to build separately? If it is separate, how would that be done?
I've pasted the code I originally used to configure wxWidgets below, with line breaks to make it easier to read:
../configure --with-osx_cocoa --with-macosx-version-min=10.7
--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
--prefix="$(pwd)" --with-opengl CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11"
OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++
There is one error while building wxWidgets:
../src/osx/cocoa/utils.mm:250:28: error: cannot initialize a parameter of type 'id' with an lvalue of type
'wxNSAppController *'
[NSApp setDelegate:appcontroller];
When I go into the samples directory and enter "make", I get: ld: library not found for -lwx_osx_cocoau_xrc-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation) When entering "make" in demos, I get: ld: library not found for -lwx_osx_cocoau_core-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I missed any steps I should have taken before these (something with Xcode maybe?) please let me know. Thank you very much in advance.
Similar question. I have sugested a workaround proposed on a forum as follows: you can use --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/".

How to get Bjam to compile boost on cygwin

I am trying to build boost on cygwin but I cannot find a way to get bjam to start the compilation. May be I am missing something. Can someone give me a clue? FYI: I got following error message.
$ bjam --without-python --without-serialization toolset=gcc-android4.4.3 link=s
tatic runtime-link=static target-os=linux --stagedir=android
warning: mismatched versions of Boost.Build engine and core
warning: Boost.Build engine (bjam) is 03.1.18
warning: Boost.Build core (at /cygdrive/c/progra~1/android/android-ndk-r6b/sourc
es/boost/tools/build/v2) is 2011.04-svn
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/tools/build/v2/util/p
ath.jam:476: in path.makedirs
rule MAKEDIR unknown in module path.
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/tools/build/v2/build/
configure.jam:190: in configure.set-log-file
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/tools/build/v2/build-
system.jam:725: in load
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/tools/build/v2/kernel
/modules.jam:283: in import
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/tools/build/v2/kernel
/bootstrap.jam:142: in boost-build
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/boost-build.jam:17: i
n module scope
UPDATE: this was a problem of old bjam.exe placed in one of my system path. After using right bjam, the problem went away.

error compiling gcc: undefined reference to libc_name_p

When compiling GCC it is possible to get very far in the build process only to hiccup on an error complaining about the lack of gperf installed. After installing gperf and running, I hit an "undefined reference to libc_name_p." I've looked at the solutions here and here but they weren't helpful.
When gperf wasn't installed, the compilation script ran the command anyway but generated a blank ./gcc/cp/cfns.h. Since this file was newer than the source (./gcc/cp/cfns.gperf) the makefile left it alone and never regenerated the 'real' file when you actually had gperf. To continue, run rm ./gcc/cp/cfns.h and try again.

Resources