undefined reference to `__cxa_throw_bad_array_new_length - g++

There are several posts citing this (or similar) undefined references, but none of those was of help.
I have code which compiles nicely on gentoo 4.14.83, with both gcc-7.3.0 and gcc-8.2.0.
On CentOS 7 (CentOS Linux release 7.6.1810 (Core)), however, the linker of g++-7.3.1 says:
/home/jody/progs/multi_spc_QHG3/kernel/Geography.cpp:68: undefined reference to `__cxa_throw_bad_array_new_length'
/home/jody/progs/multi_spc_QHG3/kernel/Geography.cpp:69: undefined reference to `__cxa_throw_bad_array_new_length'
/home/jody/progs/multi_spc_QHG3/kernel/Geography.cpp:70: undefined reference to `__cxa_throw_bad_array_new_length'
/home/jody/progs/multi_spc_QHG3/kernel/Geography.cpp:71: undefined reference to `__cxa_throw_bad_array_new_length'
The referenced lines in Geography.cpp have simple new statements:
m_adLatitude = new geonumber[m_iNumCells];
m_adLongitude = new geonumber[m_iNumCells];
m_adAltitude = new geonumber[m_iNumCells];
m_adDistances = new geonumber[m_iNumCells*m_iMaxNeighbors];
(the type geonumber is actually double, m_iNumCells and m_iMaxNeighbors have type int)
Because i need g++ version 7, i use the compiler from devtoolset-7-gcc.x86_64.
Some of the posts i found stated that this error is caused by missing libstdc++, but this is not the case here.
What causes this error, and how can it be fixed?

Related

Problems compiling with libsoup (gstreamer)

I have build the gst-build Gstreamer 1.18 version, after installing libsoup2.4-dev and I can see that the dependency is detected:
|Dependency libsoup-2.4 found: YES 2.62.1 (cached).
Later on, compiling the project that I am developing related with WebRTC I have the following issue. How can I solve it?
undefined reference to `soup_websocket_connection_close'
undefined reference to `soup_logger_new'
undefined reference to `soup_websocket_connection_get_state'
undefined reference to `soup_message_new'
undefined reference to `soup_session_websocket_connect_async'
undefined reference to `soup_session_new_with_options'
undefined reference to `soup_session_websocket_connect_finish'
undefined reference to `soup_session_add_feature'
undefined reference to `_SOUP_METHOD_GET'
undefined reference to `soup_websocket_connection_send_text'
undefined reference to `soup_session_feature_get_type
collect2: error: ld returned 1 exit status

I need help upgrading OroCommerce to 4.1.1

I just upgraded from 3.1.17 to 4.1.1 and I'm finding a problem with my shopping lists.
When I get to /customer/shoppinglist/5064 I see this:
Looking at my log files from production I see:
[2020-06-23 17:42:56] request.CRITICAL: Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\UndefinedMethodError: "Attempted to call an undefined method named "getDigitalAsset" of class "Proxies\__CG__\Oro\Bundle\AttachmentBundle\Entity\File"." at /usr/share/nginx/html/oroapp/vendor/oro/platform/src/Oro/Bundle/DigitalAssetBundle/Provider/FileTitleProvider.php line 47 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Attempted to call an undefined method named \"getDigitalAsset\" of class \"Proxies\\__CG__\\Oro\\Bundle\\AttachmentBundle\\Entity\\File\". at /usr/share/nginx/html/oroapp/vendor/oro/platform/src/Oro/Bundle/DigitalAssetBundle/Provider/FileTitleProvider.php:47)"} []
I went to look at the code and I see that in fact there is no method getDigitalAsset in oro/platform/src/Oro/Bundle/DigitalAssetBundle/Provider/FileTitleProvider.php, nor in the proxy... how can this be?
I checked this on my VM (where the problem is not happening) and I see that there's this definition in the proxy class:
/**
* {#inheritDoc}
*/
public function getDigitalAsset()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getDigitalAsset', []);
return parent::getDigitalAsset();
}
But again, I don't see a method called getDigitalAsset in the parent class.
I had some issues when doing the upgrade (I realized my nodejs wasn't upgraded as I thought it was), could that have anything to do with the issue?
Thanks
Edit:
I went through my platform upgrade again and found that there were some problems that prevented it from finishing completely.
This is what I found:
> loading Oro\Bundle\CMSBundle\Migrations\Data\ORM\LoadImageSlider
In LoadImageSlider.php line 117:
Attempted to call an undefined method named "setMainImage" of class "Oro\Bundle\CMSBundle\Entity\ImageSlide".
I commented out the loop inside the load method and re-run the upgrade. Then I got:
> loading Oro\Bundle\CMSBundle\Migrations\Data\ORM\LoadImageSlider
In QueryException.php line 65:
[Semantical Error] line 0, col 117 near 'digitalAsset': Error: Class Oro\Bundle\AttachmentBundle\Entity\File has no association named digitalAsset
In QueryException.php line 43:
SELECT file, digitalAsset, sourceFile FROM Oro\Bundle\AttachmentBundle\Entity\File file INNER JOIN file.digitalAsset digitalAsset INNER JOIN digitalAsset.sourceFile sourceFile WHERE file.parentEntityClass = :parentEntityClass
AND file.parentEntityId = :parentEntityId AND file.parentEntityFieldName =
:parentEntityFieldName
Finally I was able to complete the upgrade by commenting out the whole body of the load method
I had some issues when doing the upgrade (I realized my nodejs wasn't upgraded as I thought it was), could that have anything to do with the issue?
It looks like you have multiple versions of nodejs installed. To make an application use the right one, you can provide the absolute path to the executable with the AssetBundle configuration, like:
# config/config.yml
oro_asset:
nodejs_path: /usr/local/node
npm_path: /usr/local/npm

connected to the project at Ada QT libraries

When connecting to a project on Ada QT library produces errors.
with QT; use QT;
.....
Log.
E:\GNAT\2013\qtada\qt-qchar.o:qt-qchar.adb:(.text+0x14): undefined reference to QChar1_create'
E:\GNAT\2013\qtada\qt-qchar.o:qt-qchar.adb:(.text+0x30): undefined reference toQChar2_create'
E:\GNAT\2013\qtada\qt-qchar.o:qt-qchar.adb:(.text+0x5a): undefined reference to QChar3_create'
E:\GNAT\2013\qtada\qt-qchar.o:qt-qchar.adb:(.text+0x6f): undefined reference toQChar4_create'
E:\GNAT\2013\qtada\qt-qchar.o:qt-qchar.adb:(.text+0x8b): undefined reference to QChar5_create'
E:\GNAT\2013\qtada\qt-qchar.o:qt-qchar.adb:(.text+0xa7): undefined reference toQChar6_create'
E:\GNAT\2013\qtada\qt-qchar.o:qt-qchar.adb:(.text+0xbb): undefined reference to QChar7_create'
E:\GNAT\2013\qtada\qt-qchar.o:qt-qchar.adb:(.text+0xcf): undefined reference toQChar8_create'
E:\GNAT\2013\qtada\qt-qchar.o:qt-qchar.adb:(.text+0xe3): undefined reference to QChar_latin1'
e:/gnat/2013/bin/../libexec/gcc/i686-pc-mingw32/4.7.4/ld.exe: E:\GNAT\2013\qtada\qt-qchar.o: bad reloc address 0x20 in section.eh_frame'
e:/gnat/2013/bin/../libexec/gcc/i686-pc-mingw32/4.7.4/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
gprbuild: link of main.adb failed
[2014-04-28 08:15:40] process exited with status 4 (elapsed time: 01.50s)
Are your installed QT,QTADA libraries compatible with the Mingw-Toolchain? Also regarding the bitness 32/64. The Versions of your libraries and the compile/linker command would be helpful.
You might also consider following hint:
GMP with MinGW on Windows

Mounting a network volume from OS X App

I'm trying to mount a network volume in a OS X App.
I get it to work using the FSMountServerVolume function which is deprecated. The documentation says "To mount a network volume, use NetFSMountURLAsync instead". But when I try to use this function I get the following error message:
dyld: lazy symbol binding failed: Symbol not found: _NetFSMountURLSync
Referenced from: /Users/username/Library/Developer/Xcode/DerivedData/AppName-ammmlfwhvlfxkdburfmzioformdn/Build/Products/Debug/AppName.app/Contents/MacOS/AppName
Expected in: /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
dyld: Symbol not found: _NetFSMountURLSync
Referenced from: /Users/username/Library/Developer/Xcode/DerivedData/AppName-ammmlfwhvlfxkdburfmzioformdn/Build/Products/Debug/AppName.app/Contents/MacOS/AppName
Expected in: /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
Did I forget anything? I imported the NetFS Framework.
OK, it looks like NetFSMountURLSync() etc where introduced in 10.8.
From NetFS Changes:
Added AsyncRequestID
Added NetFSMountURLAsync()
Added NetFSMountURLBlock
Added NetFSMountURLCancel()
Added NetFSMountURLSync()
Added #def kNAUIOptionAllowUI
Added #def kNAUIOptionForceUI
Added #def kNAUIOptionKey
Added #def kNAUIOptionNoUI
Added #def kNetFSMountAtMountDirKey
Therefore you are going to have to use the "old way" in 10.7 and below and the "new way" in 10.8 and above. This means making the NetFS.framework optional rather than required and the need to perform various runtime checks to see which API you need to use.

C++ Compiler flags in AIX: -qlanglvl=newexcp works unless I add -q64 for 64bit compiling - why?

So I'm adding an exception to an existing project but have run into an issue. I have the following compiler flags:
OC_COMPFLAGS = -c $(OC_DEBUG_COMPFLAGS) **-q64** -qcpluscmt -qinitauto=00 $(OC_OPT_COMPFLAGS) -D_RWCONFIG_8d -DXML_LIBRARY **-qlanglvl=ansifor:newexcp** -qlonglong -qfuncsect -bnoquite -bloadmap -qnamemangling=v8
The newexcp flag works perfectly except when we add in the -q64 flag - at which point it stops working. Does anyone have an idea why?
This might be applicable - from http://www-01.ibm.com/support/docview.wss?uid=swg1IY20996:
"The user can get new to throw exceptions by adding the following call to their program:
__set_new_throws_exception(true);