python-ibmdb: malloc error: pointer being freed was not allocated
After reinstalling the idmdb2 package, this symbol not found error disappeard (https://github.com/ibmdb/python-ibmdb/issues/691). However, a new error occures when call the ibm_db.connect function:
python(2472,0x201366600) malloc: *** error for object 0x7ffb559e3800: pointer being freed was not allocated python(2472,0x201366600) malloc: *** set a breakpoint in malloc_error_break to debug
I’m running OSX Monterey and Python 3.9 via Anaconda.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (9 by maintainers)
@instakarlo @Dagdelo This issue should be fixed now. If you still face it, please delete the clidriver directory
/Users/henriquedelgadosales/.pyenv/versions/venv-II-API/lib/python3.9/site-packages/clidriverand go for fresh installation. Issue should be fixed now. If still you see any problem, then renameclidriver\lib\libstdc++.*library. It should be good. Thanks.For me I did the following (but not sure if it’ll work in your environment since different people have different solutions):
I upgraded gcc using brew update gcc I upgraded my ibm_db to 3.1.1 in requirements file and did a new install in virtual env then deactivate virtual env again
Before I activate my virtual env again, I ran (check ur path seems different paths for different people)
export DYLD_LIBRARY_PATH=/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/clidriver/libThen I modified .venv/bin/activate to add the following lines:
export DYLD_LIBRARY_PATH="$VIRTUAL_ENV/lib/clidriver/lib"After that I activate my virtual env:
source .venv/bin/activateAlso, Mac is asking for another upgrade, but I think I won’t upgrade for now
good luck!
Okay finally got this working, updated the version of gcc/g++ on my Mac using
brew update gcc(gcc: stable 11.2.0). Then uninstalled/reinstalled ibm-db 3.1.1 and then also ran the command to update theDYLD_LIBRARY_PATHenv variable:@amukherjee28 @Dagdelo just tested this, but it doesn’t work. I’m also quite sure that the correct clidriver folder is found, because when I delete that folder, other errors pop up.
@Dagdelo @arlon-nlo
Could you please try setting the DYLD_LIBRARY_PATH to the lib folder of the clidriver and check again. I had the issue initially for some people in Monterey and seems that this approach worked for them.
Just try and set the following path
Please let me know if this works for now.
Thanks
As soon we test it in the new OS I will update this issue. I have tagged this as new OS support for now.