hostfxr library not found when running published binary - .net-core

I am attempting to compile and run a standalone C# binary on Ubuntu, but I'm running into troubles with installed libraries. My understanding is that if I do a publish for a particular runtime then it should be able to run without installing the .so files alongside the binary, or I am making false assumptions?
When I attempt to run the application outside of its publish directory, I get:
Failed to resolve library symbol hostfxr_main, error: ./neoj: undefined symbol: hostfxr_main
Segmentation fail (core dumped)
If I list the installed dotnet packages, it currently looks like this:
dotnet-host/xenial,now 2.0.0-preview2-25407-01-1 amd64 [installed,automatic]
dotnet-hostfxr-2.0.0/xenial,now 2.0.0-1 amd64 [installed,automatic]
dotnet-runtime-2.0.0/xenial,now 2.0.0-1 amd64 [installed,automatic]
dotnet-sdk-2.0.2/xenial,now 2.0.2-1 amd64 [installed]
There seem to be a few discrepancies, but those are the dependencies pulled into automatically if I install the SDK.
If I use ldconfig -p | grep libhostfxr to check for the library then, predictably, it returns no results. I tried added /usr/share/dotnet/ in a config file, adding a symlink in that directory to the .so file and updating the cache (sudo ldconfig) which results in the library being added to the cache, but still no joy when attempting to run the command.
I've attempted to resolve this by updating the runtime framework version to 2.0.0 which resulted in a slightly more friendly error message, but the same result.
Source files are all here in case it's something non-obvious!

Related

QT on Cygwin -- IPC Errors

I've downloaded the source for QT 5.6.0 and I'm attempting to compile/install it on a Cygwin installation for Windows.
The Cygwin build already has Qt4 and Qt3 libraries installed. Trying to upgrade so I can install the latest QtCreator suite.
Here is my Cygwin version via uname -a:
CYGWIN_NT-10.0 J_Mick-Windoze 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64 Cygwin
When I try to compile QT 5.6.1 via running ./configure -platform cygwin-g++ -prefix $PWD/qtbase -opensource -nomake tests I get the following error:
Running configuration tests (phase 1)...
Done running configuration tests.
Creating qmake...
.In file included from /home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/5.6.0/QtCore/private/qcore_unix_p.h:1:0,
from /home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/global/qglobal.cpp:90:
/home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/kernel/qcore_unix_p.h: In function ‘key_t qt_safe_ftok(const QByteArray&, int)’:
/home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/kernel/qcore_unix_p.h:333:12: error: ‘::ftok’ has not been declared
return ::ftok(filename.constData(), qHash(filename, proj_id));
^
make: *** [qglobal.o] Error 1
Now clearly there is support for cygwin in the QT project as grepping inside configure I see the platform:
PLATFORM=cygwin-g++
...is defined. Doing some reading I read that ftok is a part of the IPC group of shared memory functions. One link regarding a similar error with a different app suggested linking in -lcygwin. I successfully added this to the L_FLAGS variable in the configure file, but it's still giving the same error, even when I specify the Cygwin as the platform via the -platform flag.
I would appreciate any advice as to how to get rid of this issue -- which I believe is attributable to some sort of missing IPC library error.

ArrayFire is missing LAPACK - but I have it

I just downloaded the latest release of ArrayFire (3.3.1), and am trying to build it. I'm stuck at cmake . though. I installed a bunch of missing libraries, reran it, and now I get:
-- Could NOT find LAPACK (missing: LAPACK_LIBRARIES)
CMake Warning at src/backend/opencl/CMakeLists.txt:38 (MESSAGE):
LAPACK not found. Functionality will be disabled
and
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLEWmxd_LIBRARY
linked by target "afcpu" in directory /home/joeuser/src/arrayfire-full-3.3.1/src/backend/cpu
linked by target "afcuda" in directory /home/joeuser/src/arrayfire-full-3.3.1/src/backend/cuda
linked by target "afopencl" in directory /home/joeuser/src/arrayfire-full-3.3.1/src/backend/opencl
I have installed lapack, and it's at /usr/lib/liblapack.so (that's an alternatives symlink, but it's not broken). Also installed lapacke.
ArrayFire requires the LAPACKE library (On Ubuntu, liblapacke-dev, and the graphics part requires GLEW-MX (on Ubuntu, libglewmx-dev).

qtwebengine qmake error: unkown module: webchannel

I am trying to get qt webengine running on my laptop for the first time, but can't seem to build it. I am following the instructions from here:
https://wiki.qt.io/QtWebEngineHowToTry
On the last few steps, I had to run "qmake -r" on the qtwebengine directory. This is the output:
SSL............................... Using system NSS
ICU............................... Using internal copy (Default, force system ICU with WEBENGINE_CONFIG += use_system_icu)
FFMPEG............................ Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG += use_system_ffmpeg)
Proprietary codecs (H264, MP3).... Not enabled (Default, enable with WEBENGINE_CONFIG += use_proprietary_codecs)
Reading /home/kevin/workspace/qtwebengine/src/src.pro
Reading /home/kevin/workspace/qtwebengine/src/core/core.pro
Reading /home/kevin/workspace/qtwebengine/src/core/core_gyp_generator.pro
Project ERROR: Unknown module(s) in QT: webchannel
This error happened right after I installed WebKitGtk+ from here (http://trac.webkit.org/wiki/BuildingGtk) and ran "Tools/gtk/install-dependencies" and "Tools/Scripts/update-webkitgtk-libs". Before I installed WebKitGtk+, qmake would terminate at a later point.
(I installed WebKitGtk+ because, previously, running "qmake -r" on the qtwebengine directly resulted in an "unmet dependency: harfbuzz" error that I tried to fix on my own via google, and the WebKitGtk+ page was the only lead I could find that would supposedly fix that issue... big mistake!).
I am running on a (mostly freshly reformatted) Ubuntu 15.04 laptop. I installed qt5 via apt-get install, but apparently I have both qt4 and qt5 plugins installed, as well as qtchooser (I'm guessing from the WebKitGtk+ installation scripts).
Here is the output of "qmake --version":
QMake version 3.0
Using Qt version 5.4.1 in /usr/lib/x86_64-linux-gnu
Any help would be greatly appreciated, as I'm excited to try out qt webengine!
In case anyone else has the same problem, I fixed it by installing qt 5.5.0 from here http://download.qt.io/official_releases/qt/, and using the associated qmake binary from that installation. I guess installing qt from 'sudo apt-get install' still has some issues that won't work with qtwebengine.

Setting up IJulia

I am trying to set up IJulia on my PC, but after I get it running I get the constant messages that "kernel has died" and there is a problem with ZMQ library.
Trying to rebuild or reinstall ZMQ does not work. I get an error:
================================[ BUILD ERRORS ]================================
WARNING: ZMQ had build errors.
- packages with build errors remain installed in C:\Users\Gisaev\.julia\v0.3
- build the package(s) and all dependencies with `Pkg.build("ZMQ")`
- build a single package by running its `deps/build.jl` script
Trying to execute build.jl by line (part that correspond to windows) I get the error "Provider PackageManager faild to satisfy dependency zmq."
I am kind of lost here, because ZMQ is obviously correctly installed and working for IPython - IPython notebooks work just fine; I have a fresh installation from Anaconda.
Try to run
Pkg.build("ZMQ")
to see what happens.
If there are warnings about "libpgm" and "zeromq32", you can delete the lib directories and then try to build ZMQ again.
rm -rf /Users/username/.julia/v0.x/Homebrew/deps/usr/Cellar/zeromq32/3.2.5
rm -rf /Users/username/.julia/v0.x/Homebrew/deps/usr/Cellar/libpgm/5.2.122
Pkg.build("ZMQ")
This will correctly build the libpgm and zeromq32 you needed.
(I suppose the operation system is OS X. If you are using Windows, please refer to Installing ZMQ on Windows 7+ seems to require admin privileges #69.)

installing RSRuby in Ubuntu 10.04

I'm trying to install RSRuby on Ubuntu 10.04. I barely even know what error messages to report as the relevant ones; I've just been googling around for several hours and none of the commands I try solve the problem.
Here are a few sample error messages:
$ sudo gem install rsruby -- --with-R-dir=/usr/lib/R
Building native extensions. This could take a while...
ERROR: Error installing rsruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb --with-R-dir=/usr/lib/R
checking for main() in -lR... yes
checking for R.h... no
ERROR: Cannot find the R header, aborting.
Gem files will remain installed in /var/lib/gems/1.8/gems/rsruby-0.5.1.1 for inspection.
Results logged to /var/lib/gems/1.8/gems/rsruby-0.5.1.1/ext/gem_make.out
or doing it with apt-get:
$ sudo gem install rsruby --include-dependencies -- --with-R-dir=/usr/lib/R/lib64/R --with-R-lib=/usr/lib/R/lib64/R/bin --with-R-include=/usr/lib/R/lib64/R/include
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Building native extensions. This could take a while...
ERROR: Error installing rsruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb --with-R-dir=/usr/lib/R/lib64/R --with-R-lib=/usr/lib/R/lib64/R/bin --with-R-include=/usr/lib/R/lib64/R/include
checking for main() in -lR... no
ERROR: Cannot find the R library, aborting.
Gem files will remain installed in /var/lib/gems/1.8/gems/rsruby-0.5.1.1 for inspection.
Results logged to /var/lib/gems/1.8/gems/rsruby-0.5.1.1/ext/gem_make.out
I also got the latest RSRuby from GitHub and following the instructions from its 2006 PDF manual:
$ ruby setup.rb config -- --with-R-dir=/usr/lib/R
---> lib
---> lib/rsruby
<--- lib/rsruby
<--- lib
---> ext
/usr/bin/ruby1.8 /home/mars/R/rsruby/ext/extconf.rb --with-R-dir=/usr/lib/R
checking for main() in -lR... yes
checking for R.h... no
ERROR: Cannot find the R header, aborting.
*** /home/mars/R/rsruby/ext/extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=/home/mars/R/rsruby/ext
--curdir
--ruby=/usr/bin/ruby1.8
--with-R-dir
--with-R-include
--without-R-include=${R-dir}/include
--with-R-lib
--without-R-lib=${R-dir}/lib
--with-Rlib
--without-Rlib
setup.rb:655:in `command': system("/usr/bin/ruby1.8" "/home/mars/R/rsruby/ext/extconf.rb" "--with-R-dir=/usr/lib/R") failed (RuntimeError)
from setup.rb:660:in `ruby'
from setup.rb:1238:in `extconf'
from setup.rb:1230:in `config_dir_ext'
from setup.rb:1532:in `__send__'
from setup.rb:1532:in `traverse'
from setup.rb:1549:in `dive_into'
from setup.rb:1530:in `traverse'
from setup.rb:1524:in `exec_task_traverse'
from setup.rb:1519:in `each'
from setup.rb:1519:in `exec_task_traverse'
from setup.rb:1223:in `exec_config'
from setup.rb:991:in `exec_config'
from setup.rb:826:in `__send__'
from setup.rb:826:in `invoke'
from setup.rb:773:in `invoke'
from setup.rb:1578
and in irb:
irb(main):002:0> require 'RSRuby'
LoadError: no such file to load -- RSRuby
from (irb):2:in `require'
from (irb):2
from :0
irb(main):003:0> rsruby
NameError: undefined local variable or method `rsruby' for main:Object
from (irb):3
from :0
Sometimes I'm seemingly able to get something that looks like it works, but still can't load rsruby from the irb command line.
$ sudo gem install rsruby --include-dependencies -- --with-R-dir=/usr/lib/R --with-R-lib=/usr/lib/R --with-R-include=/usr/share/R/include/
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Building native extensions. This could take a while...
Successfully installed rsruby-0.5.1.1
1 gem installed
Installing ri documentation for rsruby-0.5.1.1...
Installing RDoc documentation for rsruby-0.5.1.1...
then
$ irb
irb(main):001:0> require 'rsruby'
LoadError: no such file to load -- rsruby
from (irb):1:in `require'
from (irb):1
from :0
Ruby is version 1.8.7, I did sudo apt-get install ruby1.8-dev today but I'm not sure if that left things worse, better, or unchanged. Or if this would be easier in ruby1.9.
R is working.
I don't read Japanese but this worked for me on Ubuntu 10.10, ruby 1.9: http://d.hatena.ne.jp/cuspos/20090520/1242825057
# gem install rsruby-0.5.1.1.gem -- --with-R-dir=/usr/lib/R --with-R-include=/usr/share/R/include
Building native extensions. This could take a while...
Successfully installed rsruby-0.5.1.1
1 gem installed
# export R_HOME=/usr/lib/R
# irb
irb(main):001:0> require 'rsruby'
=> true
irb(main):002:0>
You might want to check to see if your PATH variables or dynamic links are set up so that Ruby and friends are "looking" in the right place. Ruby appears to expect RSruby to be in /var/lib/gems/1.8/gems/rsruby-0.5.1.1/ or perhaps /usr/lib/ruby/1.8/rubygems/ or perhaps /var/lib/gems/1.8/gems/rsruby-0.5.1.1/lib/, .... while your configure report says it was installed in /usr/bin/ruby1.8 /home/chris/R/. I don't have a ton of Linux experience, but what I do have tells me that each distro is different with respect to where it expects to find installed executables.
Your attempts with apt-get and gem install suggest that the installer cannot find the R header files. I would start by fixing this problem, not try other ways of installing RSruby. The next question is why it cannot find the R headers, there are two options:
The headers are installed, but they cannot be found. Use locate R.h to find where the R header file is located, and make sure this is in your $PATH.
The headers are not installed (which I suspect is the case). Often installing header files requires a development package to be installed. Try and see if there is an R-dev package or something named similarly which would contain, among others, the R header file. Installing this R-dev can be done using apt-get. The standard version of R in ubuntu 10.04 is not really up-to-date I think. CRAN has ubuntu repositories, where the dev package is called r-base-dev. Adding this repo to your sources.list gets you the latest version of R from CRAN through apt-get.
You have successfully installed rsruby, as shown by the output from your 5th example:
Successfully installed rsruby-0.5.1.1
1 gem installed
The library did not load in irb because using Ruby 1.8.7, you need to "require rubygems" first. Try this in irb:
require 'rubygems'
require 'rsruby'

Resources