Upstart causes kernel panic on embedded Linux - linux-kernel

I am using ptxdist to create kernel and rootfs images for a Linux embedded system, running on an ARM Cortex A8 CPU.
I was trying to use a newer compiler (GCC 5+) and so was forced to upgrade several external packages that would not compile under the new GCC.
I compiled the following versions of Upstart and its immediate dependencies:
upstart: 1.13.2
libnih: 1.0.3
dbus: 1.11.2
json-c: 0.12.1
When I boot, I get the following message:
init: com.ubuntu.Upstart.c:3525: Assertion failed in control_emit_event_emitted: env != NULL
init: Caught abort, core dumped
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000600
Searching online did not yield useful hints - the only relevant issue I found is this, but it is relevant to an older version of Upstart, and my libnih is of the correct version already.

According to comment #8 in the bug report you linked, it is not enough to use version 1.0.3 of libnih -- you have to specifically use the Ubuntu version, as this seems to include dbus fixes which could solve the problem you are seeing. From the bug report:
David Ireland (e-david) wrote on 2013-04-22: #7
I've built libnih
1.0.3 from source and also made sure that upstart builds with that version of the nih-dbus-tool. I'm still having this problem.
James Hunt (jamesodhunt) wrote on 2013-04-22: #8
Which problem? The
crash? If so, you are still using the wrong version of libnih: you
should be using the Ubuntu version (specifically 1.0.3-4ubuntu16) from
here:
https://code.launchpad.net/~ubuntu-branches/ubuntu/raring/libnih/raring
You do not need the --session flag to run a "Session Init" (yes, this
is a little confusing but --session was added for testing a long time
ago and is still required for that). A "Session Init" only requires
"--user".

Related

Broke yum on Centos 6.10, cannot install missing GLIBC in error due to missing libunwind

I was installing nvidia-drivers on Centos 6.10 which included a --skip-broken flag and may have broken yum. Whenever I ran yum commands this error pops up.
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/lib64/libc.so.6: version `GLIBC_2.14' not found (required by /lib64/libgcc_s.so.1)
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Jun 20 2019, 14:14:55)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
I stumbled upon this thread which talks about installing the missing GLIBC version, but I ran into this error in step 8 ../configure --prefix=/opt/glibc-2.14
checking for forced unwind support... no
configure: error: forced unwind support is required
Which then took me to this forum thread that states I should install libunwind via yum. Which was my original problem, thus leaving me at an impasse. What should I do?
You need to reinstall GCC, or more precisely the libgcc package. Something overwrote /lib64/libgcc_s.so.1 with an incompatible version. You should be able to download the libgcc RPM package from a mirror, and then run:
# rpm --reinstall libgcc-4.4.7-23.el6.x86_64.rpm
This should still work because RPM itself does not depend on libgcc_s.
In general, if you need newer versions of these core system libraries (glibc, libstdc++, libgcc_s), you need to upgrade the entire operating system. Even if you manage to replace them in a consistent fashion, you are running something that isn't very close to the original operating system anymore. At that point, it is more prudent to upgrade, because that will give you a consistent system that has been tested by many others.

while executing make of i3-gaps, undefined reference to `g_utf8_make_valid' error

After following all instructions from Compiling and Installing page, I have successfully installed all the packages required. After performing ../configure --prefix=/usr --sysconfdir=/etc --disable-sanitizers, I get
build configured:
i3 version: 4.15.0.1-323-gccb1947 (2018-09-28, branch "gaps-next")
is release version: no
build manpages: no
build docs: no
enable debug flags: yes
code coverage: no
enabled sanitizers:
To compile, run:
cd /home/dharmin/i3-gaps/build && make -j8
Now, when I do make or make -j8, I get the following error
./libi3.a(libi3_a-string.o): In function `i3string_from_utf8_with_length':
/home/dharmin/i3-gaps/build/../../i3-gaps/libi3/string.c:59: undefined reference to `g_utf8_make_valid'
collect2: error: ld returned 1 exit status
On a quick google search, I found only one related reddit link. But that did not help solve the problem.
My current i3 version
Binary i3 version: 4.11 (2015-09-30, branch "4.11") © 2009 Michael Stapelberg and contributors
Linux Distribution & Version: Ubuntu 16.04
Thank you in advance for helping :)
I made a Reddit post mentioning this question. I was having the exact same problem and was tinkering away.
My final solution was to download version 4.13*, which does not make a reference to g_utf8_make_valid. If you have all the dependencies installed, it should compile fine.
* You are running 4.11. Installing 4.13 or something newer, depending on how new the libraries you can get are, might work, but I would try to install 4.11 in your case.

h2o.xgboost - no GPUs, no multithreading

I wanted to add this as a comment to this question - is multi-cpu supported by h2o-xgboost? - but apparently my rep is too low.
I am using the latest stable version of h2o (3.14.06).
In order to try and solve this problem i've made sure that gcc is built within my docker image (using apt-get install gcc)
dpkg -l | grep gcc
gcc 4:5.3.1-1ubuntu1 amd64 GNU C compiler
gcc-5 5.4.0-6ubuntu1~16.04.5 amd64 GNU C compiler
**output truncated**
Unfortunately when the cluster is spun up its still reporting:
INFO: Found XGBoost backend with library: xgboost4j
INFO: Your system supports only minimal version of XGBoost (no GPUs, no multithreading)!
Can anyone provide any insights? Clearly I'm missing a piece of the puzzle.
Right now H2O bundles only GPU-enabled and minimal (no GPU, no OMP) version of XGBoost. However, there is an experimental change in branch mm/xgb_upgrade which contains OMP-enabled version of XGBoost (instead of minimal version): https://github.com/h2oai/h2o-3/tree/mm/xgb_upgrade
Building the mm/xgb_upgrade works. Which jira ticket is referring to this issue?

Compile nginx 1.8.1 with http_perl_module

I need help compiling nginx with the perl_module on my Mac:
System Software Overview:
System Version: OS X 10.11.1 (15B42)
Kernel Version: Darwin 15.0.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: Philipp
User Name: XXXXXXX XXXXXXXX (philipp)
Secure Virtual Memory: Enabled
Time since boot: 4 days 22:46
I configure nginx to be compiled with PCRE and PERL, i.e.,:
./configure --with-pcre=/Users/philipp/downloads/pcre-8.38 --with-http_perl_module --prefix=/servers/nginx
The output of the configure states:
checking for perl
+ perl version: This is perl 5, version 18, subversion 2 (v5.18.2)
built for darwin-thread-multi-2level
+ perl interpreter multiplicity found
If I execute make I run into the following error:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I googled and found a hint to export KERNEL_BITS=64, which did not solve the problem. Any suggestions on how to compile nginx with perl. The compilation succeeds without the --with-http_perl_module option, but in that case I cannot use perl in the nginx.conf (of course :)).
UPDATE:
I was not able to compile nginx with perl. I ended up using a pre-compiled package, which is kind of unsatisfying, because now I have to deal with a lot of packages I don't like. Anyways, if someone has a solution I'd be more than happy to know.
I'm not sure if this is offtopic or not, but as it's about using perl within nginx (which I do, and is awesome).
I had a similar problem when trying to build this module. The root of it was that I hadn't got the right LD flags.
The easiest way of doing this - IMO - is install nginx from a package, run nginx -V and see what flags were used - copy them all, and include the extras. (And check it wasn't already build in your distribution - it was in mine, which I think was a Centos 7.2 package - I don't have it to hand, but I'm not sure it would necessarily help)
You may also need to install a new perl version, to go with it though.
--with-pcre=../modules/pcre-8.38
--with-openssl=../modules/openssl-1.0.2g
--prefix=/usr/local/nginx
--with-http_perl_module
--with-http_ssl_module
--with-http_addition_module
--with-http_sub_module
--with-http_realip_module
--with-http_stub_status_module
--with-cc-opt='-I /usr/local/include'
--with-ld-opt='-L /usr/local/lib -L/usr/local/opt/perl518/lib'
I got the same problem. after about 3 hours digging with this, finally solved. This is my configure file, i installed perl518 with brew located in /usr/local/opt/perl518/lib, and use the newest nginx source code of version nginx version: nginx/1.10.0.
Things seems happend as #Sobrique said, you need to give the right --with-ld-opt & --with-cc-opt.
important, after ./configure, DO NOT doing make immediately, vi ./objs/Makefile and modify openssl config from './config' to './Configure darwin-x86_64-cc' so that it can build openssl in x86_64 mod.
Hope it can help you!

ImageMagick on Mac OSX Snow Leopard. Is there any way to get it to compile and run?

It seems that I have more trouble getting standard Unix things to run on Snow Leopard than any other platform--including Windows cygwin
For the past couple of days, I've been trying to get ImageMagick to run on Snow Leopard.
The most obvious way, Mac Ports, fails:
tppllc-Mac-Pro:ImageMagick-sl swirsky$ sudo port install imagemagick
---> Computing dependencies for p5-locale-gettext
---> Configuring p5-locale-gettext
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_perl_p5-locale-gettext/work/gettext-1.05" && /opt/local/bin/perl Makefile.PL INSTALLDIRS=vendor " returned error 2
Command output: checking for gettext... no
checking for gettext in -I/opt/local/include -arch i386 -L/opt/local/lib -lintl...gettext function not found. Please install libintl at Makefile.PL line 18.
no
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade xorg-libXt failed
Before reporting a bug, first run the command again with the -d flag to get complete output.
tppllc-Mac-Pro:ImageMagick-sl swirsky$
Not wanting to spend another two days figuring out why my libintl doesn't have a "gettext" function, I tried a different route: the script mentioned here: http://github.com/masterkain/ImageMagick-sl
This script downloads and installs an ImageMagic independently of MacPorts issues
tppllc-Mac-Pro:ImageMagick-sl swirsky$ /usr/local/bin/convert
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
Referenced from: /opt/local/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Trace/BPT trap
It downloads everything and compiles fine, but fails when I try to run it, with the message above.
So now I'm two steps away from ImageMagick, trying to get a newer libiconv on my machine.
I downloaded the latest libiconv, compiled and built it. I put the resulting library in /opt/local/lib, and I still get the same error message:
tppllc-Mac-Pro:.libs swirsky$ sudo mv libiconv.2.dylib /opt/local/lib/libiconv.2.dylib
tppllc-Mac-Pro:.libs swirsky$ convert
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
Referenced from: /opt/local/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Trace/BPT trap
Now here's something interesting. The error message shows it's looking in /opt/local/lib/libiconv.2.dylib.
otools -L shows that this does implement 8.0.0:
tppllc-Mac-Pro:.libs swirsky$ otool -L /opt/local/lib/libiconv.2.dylib
/opt/local/lib/libiconv.2.dylib:
/usr/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
tppllc-Mac-Pro:.libs swirsky$
And, for good measure, I set the DYLD_LIBRARY_PATH to make sure this directory is the one for dynamic libraries.
So even though I do have a library that provides 8.0.0, it's being seen as 7.0.0! Any ideas why this would happen?
So here's my question: Is it possible to get ImageMagick to run on OSX Snow Leopard? Are there any binary distributions that have static libraries baked in so I don't have to worry about these issue/
This worked for me:
sudo brew install imagemagick
You may also try the ImageMagick install script located here:
http://github.com/masterkain/ImageMagick-sl
It helped me a lot. May be needed to change some library versions inside the script.
I've seen this exact error with this exact library in multiple situations. It was, in every case, an instance where either the individual or an script they were using was setting the DYLD_LIBRARY_PATH variable.
Make sure this variable is not being set as it overrides loading the explicitly linked libraries with those at that path.
If the DYLD_* must be set, use the more sane DYLD_FALLBACK_LIBRARY_PATH. Which will attempt to load the explicitly linked libraries first, then fallback to the user declared ones.
I did notice on your initial build that it was not finding the gettext library in macports. So make sure those are installed.
My google showed up a few hits, and the first or second one had a link to the binary.
I was finally able to get my "macports" installation consistent enough to get imagemagick installed and running. I had to manually delete my /opt/local/ directores where the files lived, and clean out some other dependencies.
It seems that the dynamic linker is pulling in the system libiconv.2.dylib (which has compatibility version 7.0.0). Without seeing your entire build process it's hard to know for sure why this is, but I'm suspicious of your libiconv build; note that in the following failure:
tppllc-Mac-Pro:.libs swirsky$ otool -L /opt/local/lib/libiconv.2.dylib
/opt/local/lib/libiconv.2.dylib:
/usr/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
your libiconv.2.dylib seems to think that its install path is /usr/local/lib, not /opt/local/lib. This probably why the dynamic linker isn't finding it; it's looking for it in /usr/local/lib, not finding it, and falling back on the system library in /usr/lib. Try setting the install path for your libiconv.2.dylib so that it's load commands tell the linker to look for it in /opt/local/lib, and that may resolve the issue.
I had the same problem, and solved it by uninstalling then reinstalling libiconv using Macports. Then everything works fine (I also have /opt/local/lib/ as the first entry in my DYLD_LIBRARY_PATH variable)
Strange. I'm pretty happy with my macports - and everything is compiled without errors. I can only advice - use macports.
ImageMagick #6.6.9-9_0+graphviz+hdri+jpeg2+mpeg+perl+q16+rsvg+wmf (active)

Resources