Currently Google SketchUp for Mac has Ruby version 1.8.5 which I find a bit outdated. I can update Ruby to 1.8.7 (OSX's version) by the following commands
$ cd /Applications/Google\ SketchUp\ 7/SketchUp.app/Contents/Frameworks/Ruby.framework/Versions/Current
$ ls
Headers/ Resources/ Ruby
$ ls Headers/
config.h defines.h intern.h missing.h ruby.h
$ rm -r Headers
$ ln -s /System/Library/Frameworks/Ruby.framework/Headers
$ ln -fs /System/Library/Frameworks/Ruby.framework/Ruby
SketchUp starts without a problem and Ruby console shows version 1.8.7.
1.9.2
Now I try to go further and update to 1.9.2-rc2. Google SketchUp requires i386 binary, which can be produced by the following commands
$ cd ~/ruby-1.9.2-rc2/
$ ARCHFLAGS="-arch i386" CFLAGS="-arch i386" LDFLAGS="-arch i386" ./configure --with-arch=i386
$ make && sudo make install
Then I copy the necessary files to SketchUp:
$ cd /Applications/Google\ SketchUp\ 7/SketchUp.app/Contents/Frameworks/Ruby.framework/
$ rm Headers Ruby
$ cp /usr/local/bin/ruby Ruby
$ mkdir Headers
$ cp /usr/local/include/ruby-1.9.1/i386-darwin10.4.0/ruby/config.h Headers/
$ cp /usr/local/include/ruby-1.9.1/ruby.h Headers/
$ cp -r /usr/local/include/ruby-1.9.1/ruby/* Headers/
$ ls Headers
backward/ defines.h dl.h intern.h missing.h re.h ruby.h util.h vm.h
config.h digest.h encoding.h io.h oniguruma.h regex.h st.h version.h
and when I try to start SketchUp I get the following error report
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Dyld Error Message:
Library not loaded: #executable_path/../Frameworks/Ruby.framework/Versions/A/Ruby
Referenced from: /Applications/Google SketchUp 7/SketchUp.app/Contents/MacOS/SketchUp
Reason: no suitable image found. Did find:
/Applications/Google SketchUp 7/SketchUp.app/Contents/MacOS/../Frameworks/Ruby.framework/Versions/A/Ruby: can't map
/Applications/Google SketchUp 7/SketchUp.app/Contents/MacOS/../Frameworks/Ruby.framework/Versions/A/Ruby: can't map
/usr/local/lib/Ruby: not a file
/usr/lib/Ruby: not a file
Model: MacBookPro7,1, BootROM MBP71.0039.B05, 2 processors, Intel Core 2 Duo, 2.4 GHz, 4 GB, SMC 1.62f5
Could you tell me why?
UPDATE1
Dan Rathbun made some tests and found the following
On Win32 when I tried to get Sketchup
to load any 1.9.x I got an "Entry
point not found" for the ruby C
function "rb_set_kcode" which is no
longer in 1.9.x (it was renamed, and
the Ruby people did not alias the old
name to the new name.)
Basically Sketchup calls rb_set_kcode
to set the character encoding to UTF8
just after loading the Ruby
interpreter. It works fine for any
Ruby in the 1.8.x branch, but in 1.9.x
the Ruby project totally reengineered
the character encoding, and gave all
the C functions new identifiers, and
added alot more functions.
The solution for 1.9.x and Sketchup
seems to be that Sketchup needs to be
"Ruby Version Agile", which means a
coding change by the Google Guys in
Boulder.
The C level API has changed in 1.9.1. Notice that the paths to gems indicate the API compatibility: .../1.8/... for the 1.8 line and .../1.9.1/... for the 1.9.2 line.
This makes it very difficult to upgrade without recompiling.
You can require "backports"; this will get you the most of the new methods of 1.9.x, but not the new syntax or the string encoding.
Related
I'm using macOS Big Sur and trying to install Raku module like pakku add App::RaCoCo. I will get a message:
Cannot locate native library 'libarchive.13.dylib': dlopen(libarchive.13.dylib, 10): image not found
Environment:
> raku -v
Welcome to ššš¤š®ššØā¢ v2021.09.
Implementing the ššš¤š®ā¢ programming language v6.d.
Built on MoarVM version 2021.09.
Pakku> git show --pretty=reference --no-patch
09fb5c7 (Add missing space separator between `pakkuopt` in `help` command, 2021-04-17)
It happens because of the Archive::Libarchive::Raw module cannot find libarchive.13.dylib library in the default paths and crashes.
To fix it you need to install libarchive through brew and make a link for libarchive.13.dylib library:
brew install libarchive
ln -s /usr/local/opt/libarchive/lib/libarchive.13.dylib /usr/local/lib/
I have tried to run cdo sinfon command on Windows 7 cygwin -x86_64 environment but have consistently encountered with the following error. I have installed all required packages like gcc, gcc-gfortran, openssl, openssh, curl, zlib, netcdf, libnetcdf-devel, udunits-devel, proj-devel etc. I have run the following commands---
SID#SID-PC ~
$ cd /cygdrive/C/demo/tas
SID#SID-PC /cygdrive/C/demo/tas
$ PATH="$PATH:.:"
SID#SID-PC /cygdrive/C/demo/tas
$ cdo sinfon Ind.nc
C:/demo/tas/cdo.exe: error while loading shared libraries: cygproj-13.dll: cannot open shared object file: No such file or directory
SID#SID-PC /cygdrive/C/demo/tas
$ uname -a
CYGWIN_NT-6.1 SID-PC 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin
Asking the right tool
Usage: cygcheck [-v] [-h] PROGRAM
...
-p, --package-query search for REGEXP in the entire cygwin.com package
repository (requires internet connectivity)
...
you have
$ cygcheck -p cygproj-13.dll
Found 3 matches for cygproj-13.dll
libproj13-5.0.1-1 - libproj13: The PROJ Cartographic Projections Software
libproj13-5.1.0-1 - libproj13: The PROJ Cartographic Projections Software
libproj13-5.2.0-1 - libproj13: The PROJ Cartographic Projections Software
You need to install the libproj13 package.
I installed Rakudo, the Perl 6 interpreter, by:
sudo apt-get install rakudo
I am following a tutorial about installation of Perl 6 modules:
http://perl6maven.com/how-to-install-perl6-modules
And in the last step I get this error:
perl6 bootstrap.pl===SORRY!=== Error while compiling /home/daniel/test/panda/bootstrap.pl
No compiler available for Perl v6.c
at /home/daniel/test/panda/bootstrap.pl:3
------> use v6.cā;
Information about versions:
Ubuntu 16.04.2 LTS
This is perl6 version 2015.11 built on MoarVM version 2015.11
How do I install the lacking compiler?
Warning: This solution can be used for development, but for production it is recommended to manually compile the interpreter until the Ubuntu repository will not be updated.
Panda described in the linked tutorial is depreciated. I should use zef to install Perl modules.
My build of Perl was too old. I realized this after reading issue 380 about not working version 6.c.
The correct tutorial about installation of the newest Perl, 6.c, on Ubuntu is here:
http://linuxtot.com/installing-perl-6-on-debian-or-ubuntu/
Now my rakudo -v prints:
This is Rakudo version 2017.07-132-gabf1cfe built on MoarVM version 2017.07-318-g604da4d
implementing Perl 6.c.
And everything works great.
The below commands are extracted from a tutorial linked below:
apt-get install build-essential git libssl-dev
git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew
echo 'export PATH=~/.rakudobrew/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
rakudobrew build moar
rakudobrew build zef
Now to install the perl6 module:
zef install Module::Name
If you are comfortable installing your own software from source, then try the following (update the URL for the latest Rakudo Star from https://rakudo.perl6.org/downloads/star/):
wget -O rakudo-star-2017.07.tar.gz https://rakudo.perl6.org/downloads/star/rakudo-star-2017.07.tar.gz
tar -xvf rakudo-star-2017.07.tar.gz
cd rakudo-star-2017.07
perl Configure.pl --backend=moar --gen-moar
make
make rakudo-test
make install
Then add the following paths to your $PATH (replacing /path/to with the actual path, of course):
/path/to/rakudo-star-2017.07/install/bin
/path/to/rakudo-star-2017.07/install/share/perl6/site/bin
I use a module file for this:
#%Module1.0
## Metadata ###########################################
set this_module rakudo-star
set this_version 2017.07
set this_root /path/to/$this_module/$this_module-$this_version/install
set this_docs http://rakudo.org/documentation/
#######################################################
## Module #############################################
proc ModulesHelp { } {
global this_module this_version this_root this_docs
puts stderr "$this_module $this_version"
puts stderr "****************************************************"
puts stderr " $this_docs"
puts stderr "****************************************************\n"
}
module-whatis "Set up environment for $this_module $this_version"
prepend-path PATH $this_root/bin
prepend-path PATH $this_root/share/perl6/site/bin
I installed Emscripten using the instructions here, with a few differences for 13.10:
Instead of compiling and setting up clang 3.2, installed from the repository since it's 3.2. (clang --version shows expected output)
Linked the llvm since the compiler didn't find it:
sudo ln -s /usr/bin/llvm-link-3.2 /usr/bin/llvm-link
sudo ln -s /usr/bin/llvm-ar-3.2 /usr/bin/llvm-ar
But now I get an error about the nonexistence of /usr/bin/opt, even though ~/.emscripten has no mention of that directory:
$ ./em++ tests/hello_world.cpp
WARNING root: LLVM version appears incorrect (seeing "version", expected "3.2")
INFO root: (Emscripten: Running sanity checks)
CRITICAL root: Cannot find /usr/bin/opt, check the paths in ~/.emscripten
As described here, there were several more that needed links from -3.2 to normal.
Check /usr/bin installed files from llvm-3.2 package:
dpkg -L llvm-3.2 | grep /usr/bin/ | sort
Create sym-links without version number
sudo ln -s /usr/bin/llvm-ar-3.2 /usr/bin/llvm-ar
...
sudo ln -s /usr/bin/opt-3.2 /usr/bin/opt
Note: Don't forget 5 files named no include "llvm-". ( bugpoint, c-index-test, llc, macho-dump, opt)
Check /usr/bin installed files from llvm-3.2-runtime package:
dpkg -L llvm-3.2-runtime | grep /usr/bin/ | sort
Create sym-link without version number:
sudo ln -s /usr/bin/lli-3.2 /usr/bin/lli
Run Emscripten:
emcc
CopyStringsFile ../StepMania.app/Contents/Resources/it.lproj/Localizable.strings it.lproj/Localizable.strings
cd ~/OpenSource/GameDev/StepMania/PBProject
setenv ICONV /usr/bin/iconv
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings --validate --inputencoding utf-16 --outputencoding UTF-16 it.lproj/Localizable.strings --outdir ~/OpenSource/GameDev/StepMania/PBProject/../StepMania.app/Contents/Resources/it.lproj
error: can't exec '/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings' (No such file or directory)
Command /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings failed with exit code 71
But when I navigate to that location, I have the file (copystrings).
Anybody have any solutions?
Using Xcode 3.2.3 (Latest)
Mac OS X 10.6.4
I'm also using the latest SVN of StepMania, if you want to look at the localization files.
https://svn.stepmania.com/svn/trunk/stepmania/PBProject/
I had on old symlink to ruby. I originally thought this wasn't related to ruby... but as it turns out.. it is.
sudo ln -s /opt/local/bin/ruby /usr/bin/ruby
Make sure to delete the old /usr/bin/ruby first.