Maniphest T68243

Python misconfiguration in Mac build
Closed, ResolvedBUG

Assigned To
Arto Kitula (akitula)
Authored By
Jason (j-c-c-2)
Aug 5 2019, 1:44 AM
Tags
  • BF Blender
  • Add-ons (BF-Blender)
  • Platform: macOS
Subscribers
AD (black.asta)
Anders Utterstrom (autterstrom)
ben u (benu)
Benedikt Steinle (yaycreative)
Brecht Van Lommel (brecht)
domlysz (domlysz)
dr d (snakeblade)
10 More Subscribers

Description

macOS Mojave 10.14.6
Radeon RX 580 GPU

Version 2.80 (2.80 2019-07-29)

Blender seems to be working fine, but BlenderGIS add-on not working on this system. Author of add-on suggests the python is misconfigured in Blender build.

Seems like the sqlite python module is not available in your Blender installation which is anormal because it's a standard python module. The issue is related to Blender itself not BlenderGIS. I think there is a missconfig when the Blender team compiling this MacOS binary and it must be reported into Blender bugs tracker.

Screengrab attached.

Revisions and Commits

rBL Blender Libraries
rB Blender

Event Timeline

Jason (j-c-c-2) created this task.Aug 5 2019, 1:44 AM
Campbell Barton (campbellbarton) assigned this task to Brecht Van Lommel (brecht).Aug 5 2019, 5:33 AM
Brecht Van Lommel (brecht) reassigned this task from Brecht Van Lommel (brecht) to Arto Kitula (akitula).Aug 5 2019, 10:47 AM
Brecht Van Lommel (brecht) lowered the priority of this task from 90 to 50.
Brecht Van Lommel (brecht) added a subscriber: Brecht Van Lommel (brecht).

@Arto Kitula (akitula) assigning to you since I guess you will be doing the Python library upgrade.

Arto Kitula (akitula) added a comment.Aug 5 2019, 11:29 AM

Roger.

Joe de Pass (JdP11) added a subscriber: Joe de Pass (JdP11).Aug 19 2019, 10:54 PM
luis pimentel (luispimentelm) added a subscriber: luis pimentel (luispimentelm).Aug 20 2019, 6:19 PM
luis pimentel (luispimentelm) removed a subscriber: luis pimentel (luispimentelm).
Philipp Oeser (lichtwerk) added projects: Add-ons (BF-Blender), Platform: macOS.Aug 21 2019, 2:17 PM
Arto Kitula (akitula) added a comment.Aug 21 2019, 5:42 PM

Python is now updated to 3.7.4, check if it works now.

Jason (j-c-c-2) added a comment.Aug 21 2019, 10:32 PM

Hi. Still the same error I'm afraid. Latest grab attached. I'm a little confused why it appears to be trying to look for a local folder on ‘brecht's’ drive when that would be impossible. Good luck... again. Thanks.

Jason (j-c-c-2) added a comment.Aug 21 2019, 10:32 PM

Also wanted to check whether this really was a Blender issue or the BlenderGIS add-on, after all?

Arto Kitula (akitula) added a comment.Aug 22 2019, 3:24 AM

Check python console and if the version is 3.7.4, your build is up to date.

Jason (j-c-c-2) added a comment.Aug 22 2019, 4:05 AM

Console states 3.7.0. That was from a version of Blender downloaded again today, 22 August. Do I need to try that again or go elsewhere for a 'new' build? Thanks.

Arto Kitula (akitula) added a comment.Aug 22 2019, 4:29 AM

Wait for buildbot to be able to build new one, it should have the new one.

Jason (j-c-c-2) added a comment.Aug 22 2019, 9:32 AM

Blender 2.8.1 build now has Python 3.7.4 and the BlenderGIS add-on now installs. Thank you.

Philipp Oeser (lichtwerk) changed the task status from Unknown Status to Resolved.Aug 22 2019, 9:34 AM
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).

Glad to hear, closing then...

Ming (ymyz1229) added a subscriber: Ming (ymyz1229).Dec 10 2019, 1:34 PM

the same question, but the path is 'azo'.

macOS Mojave 10.14.6
python 3.7.4
blender 2.81a

Brecht Van Lommel (brecht) reopened this task as Confirmed.Jan 28 2020, 4:33 PM

Seems the issue still exists indeed.

Brecht Van Lommel (brecht) changed the subtype of this task from "Report" to "Bug".Jan 28 2020, 4:36 PM
Benedikt Steinle (yaycreative) added a subscriber: Benedikt Steinle (yaycreative).Feb 8 2020, 1:01 PM

The issue still persists in Blender 2.81a :(

Juergen Furrer (juergen.furrer) added a subscriber: Juergen Furrer (juergen.furrer).Feb 8 2020, 2:49 PM

Tried 2.8.2-Beta and 2.8.3-Alpha, same problem

Juergen Furrer (juergen.furrer) added a comment.EditedFeb 8 2020, 3:08 PM

Found a solution:
Locate the installed sqlite3-version.
In my case "/opt/local/lib/libsqlite3.0.dylib"
Open the terminal and create the path:

sudo mkdir -p /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/
sudo chmod -R 777 /Users/azo/
cd /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/

Create a ln to your sqlite3:

ln -s /opt/local/lib/libsqlite3.0.dylib libsqlite3.0.dylib
AD (black.asta) added a subscriber: AD (black.asta).Feb 9 2020, 5:11 PM

Hi there!

Got the same error below:

After recursively searched for "brecht", much of the matched string hit resides in file "_sysconfigdata_m_darwin_darwin.py". I'm not familiar on Blender internals but seems like this value was statically typed and appears many times:

10 # system configuration generated and used by the sysconfig module
 9 build_time_vars = {'ABIFLAGS': 'm',
 8  'AC_APPLE_UNIVERSAL_BUILD': 0,
 7  'AIX_GENUINE_CPLUSPLUS': 0,
 6  'ANDROID_API_LEVEL': 0,
 5  'AR': 'ar',
 4  'ARFLAGS': 'rcs',
 3  'BASECFLAGS': '-Wno-unused-result -Wsign-compare -Wunreachable-code',
 2  'BASECPPFLAGS': '',
 1  'BASEMODLIBS': '',
 0  'BINDIR': '/Users/brecht/dev/build_darwin/deps/Release/python/bin',
 1  'BINLIBDEST': '/Users/brecht/dev/build_darwin/deps/Release/python/lib/python3.7',
 2  'BLDLIBRARY': 'libpython3.7m.a',
 3  'BLDSHARED': 'gcc -bundle -undefined dynamic_lookup '
 4               '-L/Users/brecht/dev/build_darwin/deps/Release/sqlite/lib '
 5               '-L/Users/brecht/dev/build_darwin/deps/Release/bzip2/lib '
 6               '-L/Users/brecht/dev/build_darwin/deps/Release/lzma/lib '
 7               '-L/Users/brecht/dev/build_darwin/deps/Release/zlib/lib '
 8               '-isysroot '
 9               '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk '
10               '-mmacosx-version-min=10.9',
11  'BUILDEXE': '.exe',
12  'BUILDPYTHON': 'python.exe',

It also appears that these values are to be used by sysconfig module. I didn't dig enough to find out what sysconfig module is, but I hope the snippet above helps resolving the issue.

Thanks!

Jason Clark (j-c-c) added a subscriber: Jason Clark (j-c-c).Feb 9 2020, 7:58 PM

Yes, the references to ‘local’ paths in the configuration file(s) paths was picked up at the beginning, six months ago. I'm no programmer, but seems no one else is either as this should have been fixed by now. Personally, moved on to another app and solution as I have no faith in a fix here. Shame for the creator of the add-on as well.

AD (black.asta) added a comment.EditedFeb 10 2020, 12:57 AM

@Jason Clark (j-c-c) Oh I see, yes I agree... I went and looked at the Makefile and have seen reference's to the dev's localpath:

9 BASECFLAGS=  -Wno-unused-result -Wsign-compare -Wunreachable-code
8 BASECPPFLAGS=
7 CONFIGURE_CFLAGS= -I/Users/brecht/dev/build_darwin/deps/Release/sqlite/include -I/Users/brecht/dev/build_darwin/deps/Release/bzip2/include -I/Users/brecht/dev/build_darwin/deps/Release/lzma/include -    I/Users/brecht/dev/build_darwin/deps/Release/zlib/include
6 # CFLAGS_NODIST is used for building the interpreter and stdlib C extensions.
5 # Use it when a compiler flag should _not_ be part of the distutils CFLAGS
4 # once Python is installed (Issue #21121).
3 CONFIGURE_CFLAGS_NODIST= -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration
2 CONFIGURE_CPPFLAGS= -I/Users/brecht/dev/build_darwin/deps/Release/sqlite/include -I/Users/brecht/dev/build_darwin/deps/Release/bzip2/include -I/Users/brecht/dev/build_darwin/deps/Release/lzma/include     -I/Users/brecht/dev/build_darwin/deps/Release/zlib/include
1 CONFIGURE_LDFLAGS=  -L/Users/brecht/dev/build_darwin/deps/Release/sqlite/lib -L/Users/brecht/dev/build_darwin/deps/Release/bzip2/lib -L/Users/brecht/dev/build_darwin/deps/Release/lzma/lib -L/Users/brecht/dev/build_darwin/deps/Release/zlib/lib
0 # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
1 # command line to append to these values without stomping the pre-set

I guess for the time being we can follow the workaround posted above by @Juergen Furrer (juergen.furrer) -- creating a softlink that point to an actual libsqlite3.0.dylib, which Blender.app Gimp directory should have. In my install, it is located at:/Applications/Gimp-2.10.app/Contents/Resources/lib/libsqlite3.0.dylib, not ideal but at least we have a workaround.

Isaac (Treki26) added a subscriber: Isaac (Treki26).Feb 10 2020, 8:11 PM
Wombura Kimacha Nanai (kimacha) added a subscriber: Wombura Kimacha Nanai (kimacha).Feb 11 2020, 8:43 AM
In T68243#867904, @Juergen Furrer (juergen.furrer) wrote:

Found a solution:
Locate the installed sqlite3-version.
In my case "/opt/local/lib/libsqlite3.0.dylib"
Open the terminal and create the path:

sudo mkdir -p /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/
sudo chmod -R 777 /Users/azo/
cd /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/

Create a ln to your sqlite3:

ln -s /opt/local/lib/libsqlite3.0.dylib libsqlite3.0.dylib

Hello @Juergen Furrer (juergen.furrer) , thank you for the hack provided though I still can't figure out your path for the created directory provided. Is lib folder the same as the one located in contents folder of Blender application?

Juergen Furrer (juergen.furrer) added a comment.EditedFeb 11 2020, 9:07 AM
In T68243#869413, @Wombura Kimacha Nanai (kimacha) wrote:
In T68243#867904, @Juergen Furrer (juergen.furrer) wrote:

Found a solution:
Locate the installed sqlite3-version.
In my case "/opt/local/lib/libsqlite3.0.dylib"
Open the terminal and create the path:

sudo mkdir -p /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/
sudo chmod -R 777 /Users/azo/
cd /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/

Create a ln to your sqlite3:

ln -s /opt/local/lib/libsqlite3.0.dylib libsqlite3.0.dylib

Hello @Juergen Furrer (juergen.furrer) , thank you for the hack provided though I still can't figure out your path for the created directory provided. Is lib folder the same as the one located in contents folder of Blender application?

In my system I found lots of libsqlite3.0.dylib (I used the one from mac-port)

Update your locate-db:

sudo /usr/libexec/locate.updatedb

then search for sqlite:

locate libsqlite3.0.dylib

It will show you all locations where sqlite is used:
Filezilla
XCODE
Mono.framework
MacGPG
/opt/local/lib/libsqlite3.0.dylib
/usr/lib/libsqlite3.0.dylib

Wombura Kimacha Nanai (kimacha) added a comment.Feb 11 2020, 9:12 AM
In T68243#869415, @Juergen Furrer (juergen.furrer) wrote:
In T68243#869413, @Wombura Kimacha Nanai (kimacha) wrote:
In T68243#867904, @Juergen Furrer (juergen.furrer) wrote:

Found a solution:
Locate the installed sqlite3-version.
In my case "/opt/local/lib/libsqlite3.0.dylib"
Open the terminal and create the path:

sudo mkdir -p /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/
sudo chmod -R 777 /Users/azo/
cd /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/

Create a ln to your sqlite3:

ln -s /opt/local/lib/libsqlite3.0.dylib libsqlite3.0.dylib

Hello @Juergen Furrer (juergen.furrer) , thank you for the hack provided though I still can't figure out your path for the created directory provided. Is lib folder the same as the one located in contents folder of Blender application?

In my system I found lots of libsqlite3.0.dylib (I used the one from mac-port)

Update your locate-db:

sudo /usr/libexec/locate.updatedb

then search for sqlite:

locate libsqlite3.0.dylib

It will show you all locations where sqlite is used:
Filezilla
XCODE
Mono.framework
MacGPG
/opt/local/lib/libsqlite3.0.dylib
/usr/lib/libsqlite3.0.dylib

Worked like a charm, thank you!

Brecht Van Lommel (brecht) closed this task as Resolved by committing rB757da6160673: Fix T68243: Python sqlite module not working on macOS.Feb 11 2020, 10:35 AM
Brecht Van Lommel (brecht) added a commit: rB757da6160673: Fix T68243: Python sqlite module not working on macOS.
Brecht Van Lommel (brecht) added a comment.Feb 11 2020, 10:36 AM

This will be fixed in 2.83, for 2.82 it's too risky a change at this point in the release cycle.

Brecht Van Lommel (brecht) added a commit: rBL62369: Fix T68243: Python sqlite module not working on macOS.Feb 11 2020, 10:42 AM
ben u (benu) added a subscriber: ben u (benu).Feb 11 2020, 5:13 PM

In my system I found lots of libsqlite3.0.dylib (I used the one from mac-port)

Update your locate-db:

sudo /usr/libexec/locate.updatedb

then search for sqlite:

locate libsqlite3.0.dylib

For people unfamiliar with the terminal, note that that first command may take a number of minutes to process on your mac (it's building a database of files on your computer).

dr d (snakeblade) added a subscriber: dr d (snakeblade).EditedFeb 12 2020, 4:31 AM

It seems to be working for me in 2.83 (2-4-2020 build)

Could the SQlite symlink be the problem for Mac Users (beyond hard-coded references to local drives)?
This is what I receive whenever I update the brew installs.

==> sqlite
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.

If you need to have sqlite first in your PATH run:
  echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile

For compilers to find sqlite you may need to set:
  export LDFLAGS="-L/usr/local/opt/sqlite/lib"
  export CPPFLAGS="-I/usr/local/opt/sqlite/include"

For pkg-config to find sqlite you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"
Anders Utterstrom (autterstrom) added a subscriber: Anders Utterstrom (autterstrom).Feb 19 2020, 3:41 AM
Anders Utterstrom (autterstrom) added a comment.Feb 19 2020, 3:57 AM

I downloaded 2.83a and BlenderGIS installed. Thanks dr d (snakeblade) for the 2.83 tip. Catalina 10.15.3

VM (dezBrown) added a subscriber: VM (dezBrown).Feb 29 2020, 5:14 PM

Just to confirm, tried 2.83a and BlenderGIS installed without error. Thank you snakeblade!

Martin (Martino88) added a subscriber: Martin (Martino88).EditedJul 7 2020, 11:03 AM

Hi

I just have tried to use Blender GIS on my Mac and I'm using Blender 2.83.1, so according the the comment on this site it also should work on a Mac:
https://github.com/domlysz/BlenderGIS
Unfortunately it does not work, I can install it without any problem, but as soon I open a Map from Google Maps with Satelite, Blender is blocked, so I can't do anything in "Files" or "Editing", etc. The only thing I can do is, moving the Map on the Display, scrolling of the Map is also not possible.
So I just can see the small Map of the World, but I can't do anything more, than moving this Map.
Is there a possibility to fix this?
Would be very grateful, if I also could use it on my MAC.

Thanks in advance.

Jay (HyperA) added a subscriber: Jay (HyperA).Jul 19 2020, 11:12 AM

I have the same error as Martin. Running latest 2.83.2 on OS Catalina, installing plugin works fine, enabling plugin works fine, clicking GIS, selecting base map loads a small world map square, then the whole program locks up and the only button that works is the menu bar, allowing quit, but nothing else is clickable.

domlysz (domlysz) added a comment.Jul 19 2020, 11:26 AM

@Jay (HyperA) @Martin (Martino88), your difficulties have nothing to do with the original issue described here which is now resolved and closed. If you need help, open a new issue at the addon homepage and please don't bother the Blender team here. Also it seems that both of you haven't read the addon documentation as the basemap operator is a modal operator and you just need to press echap to exit it.