Unable to load dynamic library 'intl.so': undefined symbol: __cxa_throw_bad_array_new_length) - libstdc++

After installing an new version of intl (source: here), I added extension=intl.so to my php.ini file (/etc/opt/remi/php72/php.ini).
But when I restart my Nginx server, I get this warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'intl.so'
(tried: /usr
/lib64/php/modules/intl.so (/usr/lib64/php/modules/intl.so: undefined
symbol: __
cxa_throw_bad_array_new_length)
I saw in this post, that this is a linking problem, and that I should "link" intl.so against the correct libstdc++.so
(Indeed, I compiled intl.so with gcc7.1 and it says that the present libstdc++.so should be from gcc4.8)
Here is the result of "locate libstdc++":
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libstdc++.so
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/32/libstdc++.so
/usr/lib64/libstdc++.so.6
/usr/lib64/libstdc++.so.6.0.19
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.py
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyc
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyo
Problem: I don't know how to do this linking, and what it means exactly.
Thanks for your help.

Related

Unable to load swrast for Anaconda spyder

I'm running Anaconda Spyder on Fedora 34.
When I run spyder I get the following error
No QCoreApplication instance found. Application patches not applied. You have to call load_stylesheet function after instantiation of QApplication to take effect.
libGL error: MESA-LOADER: failed to open iris: /home/ted/anaconda3/lib/python3.8/site-packages/zmq/backend/cython/../../../../.././libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib64/dri/iris_dri.so) (search paths /usr/lib64/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /home/ted/anaconda3/lib/python3.8/site-packages/zmq/backend/cython/../../../../.././libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib64/dri/swrast_dri.so) (search paths /usr/lib64/dri)
libGL error: failed to load driver: swrast
libpng warning: bKGD: invalid
libpng warning: bKGD: invalid
I can see that libstdc++.so.6 is in /usr/lib64, but the search path is /usr/lib64/dri
How can I get iris and swrast to search /usr/lib64 for the driver?
Creating a symlink didn't work.
I have found the answer in this video at 14:50
https://www.youtube.com/watch?v=OqqZ3tqgJnA
You have simply to rename files
libstdc++.so
libstdc++.so.6
libstdc++.so.6.0.28
(or any that have libstdc++.so in it)
in home/anaconda3/lib
You might try this out.
https://unix.stackexchange.com/questions/655495/trying-to-run-pygame-on-my-conda-environment-on-my-fresh-manjaro-install-and-ge
I recommend to directly copy your /usr/lib/libstdc++.so.6 into (anaconda)/lib/.
All the above answers are correct . Also remember if you are in different environment than the base environment. Then you will have to rename
it in that envrionment.
You will find those in env/(env_name)/lib
libstdc++.so -> libstdc++.so.old
libstdc++.so.6 -> libstdc++.so.6.old
libstdc++.so.6.0.28 -> libstdc++.so.0.28.old
Sometimes instead of libstdc++.so.6.0.28 it might be libstdc++.so.6.0.29 or any other number.
Refer this video
https://youtu.be/OqqZ3tqgJnA?t=876

Xamarin iOS Firebase Native linking failed

After updating the Firebase libraries, I'm getting the following errors:
MTOUCH : error MT5210: Native linking failed, undefined symbol: _APMAnalyticsConfiguration. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
Blockquote
MTOUCH : error MT5210: Native linking failed, undefined symbol: _APMAppMeasurementOriginFirebase. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _APMIsAnalyticsCollectionDeactivated. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _APMIsAnalyticsCollectionEnabled. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _APMMonitorLogTagOptionKey. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _APMSafelistedEventsOptionKey. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
I've tried the following:
Deleting obj and bin folders
Cleaning the project
Initializing Firebase core (Firebase.Core.App.Configure();)
I've tried all linker behavior options.
I'm referencing the following Firebase libraries:
Xamarin.Firebase.iOS.Analytics (6.4.1)
Xamarin.Firebase.iOS.CloudMessaging (4.3.0)
Xamarin.Firebase.iOS.Core (6.6.6)
Xamarin.Firebase.iOS.DynamicLinks (4.0.8)
Xamarin.Firebase.iOS.Installations (1.1.1)
Xamarin.Firebase.iOS.InstanceId (4.3.3)
Does anyone know how to solve this?
Unfortunately, there isn't much that you can do in this case. The error is related to incorrect linking. The guys from Xamarin have messed up the bindings after one of the upgrades. You can read more about using native libraries in Xamarin here & more specifically here.
However, you can still do something to help - isolate which package caused the issue and from which version onwards it happens. Then, report it at the official GitHub repository for Google APIs here.
P.S. I have gone through the issues and haven't seen this exact list of errors. There have been (and still are) a lot of binding issues, which are waiting to be fixed. So, in order to speed things up, discuss it with the devs from the issue and hopefully, they will be able to resolve it quickly.

Go MIDI portmidi installation

I'm new in Go. I want to use PortMidi wrapper for Go, trying to use this:
Go PortMidi
When using:
go get github.com/rakyll/portmidi
I've got:
/usr/bin/ld: $WORK/github.com/rakyll/portmidi/_obj/portmidi.cgo2.o: undefined reference to symbol 'Pt_Start'
/usr/lib/libporttime.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Tried to search something about:
DSO missing from command line
And:
undefined reference to symbol 'Pt_Start'
But found nothing.
Repaired it.
Installing libportmidi0 from official repo is bad idea. Need to compile it, for example from:
PortMIDI source download
All the instructions how to compile it in directory pm_linux.
The dynamic library of libportmidi is missing.
Try:
sudo apt-get install libportmidi0
That should fix it if you're on a debian/ubuntu system. If the library is not available on your linux system search your can still get the library source and compile it yourself.

How can I fix this PDL installation?

I have installed PDL on a Mac OS X (10.7.3) machine. Evidently the SciPDL installer places PDL.pm in /Library/Perl/5.12/darwin-thread-multi-2level, so I added
use lib '/Library/Perl/5.12/darwin-thread-multi-2level';
at the top of my test script. I now get these errors:
dyld: lazy symbol binding failed: Symbol not found: _Perl_Gthr_key_ptr
Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/PDL/Core/Core.bundle
Expected in: flat namespace
dyld: Symbol not found: _Perl_Gthr_key_ptr
Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/PDL/Core/Core.bundle
Expected in: flat namespace
Unfortunately these errors don't mean much to me. What do they mean? And what's the solution?
Use cpanm to install modules instead of the SciPDL installer. Install cpanm:
either bootstrap from the Web:
curl -L http://cpanmin.us | perl - --self-upgrade
or with the CPAN client that ships with Perl:
cpan App::cpanminus
Install PDL:
cpanm PDL
This compiles PDL for your specific platform, making sure all the paths are set properly.

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.

Resources