How to run an application on a newer GLIBC? - glibc

There are some posts and answers on similar topics but I have a different case. And I am looking for a solution without using patchelf.
I am using an OS with GLIBC version 2.17 and my application requires GLIBC version 2.18.
I compiled GLIBC version 2.18 on the OS and I am able to run my application using below steps:
./bin/patchelf --set-interpreter
/home/nexir/glibc/build/elf/ld-linux-x86-64.so.2 --set-rpath
/home/nexir/glibc/build /home/nexir/app/myapp
/home/nexir/app/myapp
I do not get any errors and my application able to start successfully.
I am looking for another solution to run my application without using patchelf command. Since, it is modifying my application executable, my client doesn't accept it.
When I run my application using the below command:
LD_PRELOAD=/home/nexir/glibc/build/libc.so.6 /home/nexir/glibc/build/elf/ld-linux-x86-64.so.2 /home/nexir/app/myapp
I got Segmentation fault error.
What is the problem with my command? If patchelf works, then there must be another way to run it.

Related

Can't build the haskell shakespeare library on windows 10. Any ideas?

I'm trying to install Yesod through cabal on my HP computer, but the building process fails when shakespeare library gets the turn. MSYS2+MinGW in the path, the rest actually works. What could be the issue? I have my suspicions that it might be due to the x64 processor I have, but not sure.
Tried installing globally with runhaskell, but same story.
C:\Users\Ivan Kretov>cabal install shakespeare
Warning: The install command is a part of the legacy v1 style of cabal
usage.
Please switch to using either the new project style and the new-install
command or the legacy v1-install alias as new-style projects will become
the default in the next version of cabal-install. Please file a bug if
you cannot replicate a working v1- use case with the new-style commands.
For more information, see: https://wiki.haskell.org/Cabal/NewBuild
Resolving dependencies...
Starting shakespeare-2.0.20
Building shakespeare-2.0.20

Ubuntu programs won't run from command line but say they are installed

I am new to Linux and non-Microsoft web development (long time MS developer). I am making some kind of fundamental mistake when I install Linux programs but I don't know what.
I am trying to install spring-boot-cli for use to make a Java microservice. I am just trying to learn how. I followed the installation instructions I found here, ending up using the SDKMAN installation method: https://docs.spring.io/spring-boot/docs/current/reference/html/getting-started-installing-spring-boot.html
When I try to run spring --version, it says spring is not installed. When I go back and try to install it again, sdk says, "STOP! this is already installed."
I am having a similar problem with Maven. I try to run command line commands and it is not recognized, but it claims it is installed.
a bit unusual but at the terminal type:
> which spring
and then
> $PATH
should give you a starting point.

How to deploy a Qt application that uses SQLite on OS X

I am trying to deploy a Qt application that uses SQLite on OS X.
I simply ran the command:
macdeployqt MyApplication.app -dmg
and I get the following error:
ERROR: no file at "/opt/local/lib/mysql55/lib/libmysqlclient.18.dylib"
I already read about SQLite plugin on this link but I could not understand how it works.
Note:
I have a folder: ......./Qt5.3.2/5.3/clang_64/plugins/sqldrivers/
that contains:
libqsqlite.dylib
libqsqlite_debug.dylib
and some other libs related to other sql drivers.
Any idea how can I solve this?
Thanks
As SGaist answer here:
macdeployqt deploys all the plugins by default since it doesn't know
which one you'll be using.
Note that you can build the .dmg in two steps, first run macdeployqt,
then remove all the unused Sql plugins and then create the image.
It means that if I am not using MySQL in my application I can just ignore this error message.

Running qtcreator 4.0.1 on a lxc-container

Using this link I created a container and after getting some packages, I want to start a qtcreator 4.0.1 on it. I use a ssh connection to connect to the container. After launching qtcreator I get an error such as this:
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.
Reinstalling the application may fix this problem.
I installed all prerequisites packages as listed here but still the problem is remained.
I must mention that I am using a privileged container in opposite of the link.
xcb listed as available plug-ins but it does not run. Is there any suggestion to get around this bug?
This answer has the main solution. In my case I find the libqxcb.so in path /path_to_qt/plugins/platforms/ and after running ldd command on it I found that it has not one of its dependency libEGL.so after install this package using sudo apt install libegl-mesa0-dev I could run qtcreator.

DSS(Darwin Streaming Server) install failed on OS X10.10

I want to build a Darwin Streaming Server on my mac for iOS development test. But after taking the following steps which I searched from google, it fails all the time.
Method 1:
Download from http://dss.macosforge.org/ ->Mac OS X Install -> Streaming Server;
Install the dmg;
It tries to open http://127.0.0.1:1220/ but fails with "This webpage is not available ERR_CONNECTION_REFUSED".
Method 2:
Download the source code of 6.0.3 version;
$ tar xvf DarwinStreamingSrvr6.0.3-Source.tar
$ cd DarwinStreamingSrvr6.0.3-Source
$ wget http://www.abrahamsson.com/dss-6.0.3.patch
$ patch -p0 < dss-6.0.3.patch
$ ./Buildit
Then, it fails with the following words.
Darwin Streaming Server
I don't know your platform. I'll assume this is a Linux x86 platform.
Please edit the BuildServer script & PlatformHeader.h to add your platform.
Building for Darwin.x86_64 with gcc
xcodebuild DarwinStreamingServer
=== BUILD LIBRARY TARGET AtomicLib (Library) OF PROJECT StreamingServer WITH CONFIGURATION Development ===
Check dependencies
Jam is deprecated and has been removed; targets that use Jam must be upgraded to native targets. For more information on doing this, consult the Xcode documentation.
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)"
I tried to run ./Install, it showed me
Unable to perform install
You must be logged in as root to install Darwin Streaming Server
and I don't know what to do now.
PS: I've installed Xcode on my mac and didn't find any available document about Darwin Streaming Server, or I missed it?
Hope for any help. Thanks.
Calios and Jessica, thank you for your answers. I'm running using OS Windows 7 and installing DSS 5.5.5 for windows, and I also meet the condition same as with you.
However, after I followed your instructions, it's not close enough with our needs, because the button will lose meaning in presentation.
So I started digging more information from another articles, and I found interesting perception from a developer at this article. He said the following:
Maybe this has something to do with the perl script which generates the web sites?*
So starting from Jens's perception, I tried to downgrade my Perl Script from version 5.26 to 5.8. This resolved my problem, the interface displays correctly as in the DSS Tutorial.
Right now I'm still working on testing the DSS function
I hope this solution will help others.
Well, finally I solved this issue with the help of my friend.
Here's the steps of solution.
I've given up compiling and building on my own and downloaded the dmg file.(version 6.0.3)
Install the dmg as directions.
Then, go to /usr/sbin in terminal and find streamingadminserver.pl and QuickTimeStreamingServer.
Run them.
Check if they're running with ps aux|grep streaming.
Open http://localhost:1220/parse_xml.cgi in Safari or Chrome. It will show some textfield and a button.
However, there's no words at all ! Go to /Library/QuickTimeStreaming/AdminHtml and edit setup_assistant2.html.
Find line 333 and change it from return "$message{$name}"; to return $name;.
Then it shows some understandable words, though not exact words.
Till now, it can be partly work. However, in some steps I mentioned above, for example, html editing step, I really don't know why the words just don't show and just have a try.
Save the exact steps I did here for memory. It will be wonderful if it can help anyone or anyone have some good idea about it.
Thanks.
#SouravGupta, I am a newbie for stackoverflow, so I could not add comment to reply your question.
I just installed DDS 6.0.3 on Mac OS X El Capitan. I hit the same problem you had. I found that ** return "$message{$name}"; ** is no longer in setup_assistant2.html. It is in parse_xml.cgi (/Library/QuickTimeStreaming/AdminHtml). Just search for "sub foundString". There were two return places there. You need to change both in order to make it work.
It seems that DDS web admin software has localization function. Html files only contain string keywords. It suppose to use that "foundString" function to get translated string from keywords. However, for some reason, it returns empty string here even if there is a "messages" file inside html_en folder. I could not spend more time to figure out why right now.
QTSS/DSS Web Admin 6.0.3 requires Perl version 5.16 and earlier. OS X 10.11 El Capitan installs both Perl versions 5.16 and 5.18, but it defaults to using Perl version 5.18.
In order to run QTSS/DSS Web Admin in OS X 10.11 El Capitan, you need to examine each of the Perl script (.pl) within the AdminHtml folder and change the line #!/usr/bin/perl to #!/usr/bin/perl5.16.

Resources