[Bf-committers] Blender-2.55 has no menu bar

Dave Plater dplater at webafrica.org.za
Tue Nov 2 21:12:56 CET 2010


On 11/02/2010 03:42 AM, Campbell Barton wrote:
> On Tue, Nov 2, 2010 at 12:58 AM, Dave Plater <dplater at webafrica.org.za> wrote:
>   
>> Didn't realize I'd exceeded the size limit, sending without attachment, will upload blenderstrace.txt to bug 3015824. Also having trouble
>> losing the attachment with thunderbird, hope I don't have to resend a copy paste version.
>>
>> On 11/01/2010 01:52 AM, Campbell Barton wrote:
>>     
>>> You shouldn't need to copy files from /usr/share/blender into
>>> ~/.blender, if so then its a bug.
>>>
>>>       
>> I understand from this that I can delete ~/.blender and blender should
>> create it on first use, is this correct?
>>     
>>> I just tested and it work as expected.
>>>
>>> With CMake, set the CMAKE_INSTALL_PREFIX variable, its "/usr/local" by
>>> default, I set it to "/opt/blender25"
>>>
>>> "make install" copies the files into the install prefix.
>>>
>>>       
>> Please excuse the layout of my replies, I'm writing this over a period of time as I find out (what are IMHO) relevant information.
>> I'm using svn 32811 for this exercise hope it doesn't change anything.
>>
>> The make install part of using cmake over scons is a big step forward
>> from scons placing everything in install/linux2. I cannot use
>> %{buildroot}, which is where the files to populate the rpm go, in the
>> %build section of the spec file and scons didn't place the files in an
>> FHS type directory hierarchy. Now with make install I can use the
>> rpmbuild macro %makeinstall and the files go into FHS compliant
>> directories, I only have to move the locale directory to /usr/share/locale.
>> My %{prefix} is /usr, %{_bindir}=/usr/bin and %{_datadir}=/usr/share.
>>
>> When I am finished I will attach the final 11.3 x86_64 build log.
>>
>>     
>>> For an example on using CMake to create a package see:
>>>   ./build_files/package_spec/pacman/PKGBUILD
>>>
>>> You could look into why it cant find the script directory using strace.
>>>
>>> If you grep for the dir you filter out a lot of junk, notice the last
>>> line the path is found, eg:
>>>
>>>  ~ # strace /opt/blender25/bin/blender 2>&1 | grep "/opt/blender25"
>>> execve("/opt/blender25/bin/blender", ["/opt/blender25/bin/blender"],
>>> [/* 36 vars */]) = 0
>>> readlink("/proc/self/exe", "/opt/blender25/bin/blender", 4094) = 26
>>> stat("/opt/blender25/bin/blender", {st_mode=S_IFREG|0755,
>>> st_size=125951465, ...}) = 0
>>> stat("/opt/blender25/bin/2.55/config", 0x7fff8291a6e0) = -1 ENOENT (No
>>> such file or directory)
>>> stat("/opt/blender25/bin/2.55/config", 0x7fff8291a6a0) = -1 ENOENT (No
>>> such file or directory)
>>> stat("/opt/blender25/bin/2.55/python", 0x7fff8291a770) = -1 ENOENT (No
>>> such file or directory)
>>> stat("/opt/blender25/bin/release/python", 0x7fff8291a580) = -1 ENOENT
>>> (No such file or directory)
>>> stat("/opt/blender25/share/blender/2.55/python", 0x7fff8291a580) = -1
>>> ENOENT (No such file or directory)
>>> readlink("/opt/blender25/bin/blender", 0x7fff82905940, 4096) = -1
>>> EINVAL (Invalid argument)
>>> stat("/opt/blender25/bin/Modules/Setup", 0x7fff82906880) = -1 ENOENT
>>> (No such file or directory)
>>> stat("/opt/blender25/share/blender/2.55/scripts/modules",
>>> {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
>>>
>>>
>>>       
>> Using "strace /usr/bin/blender.bin 2>&1 | grep "/usr"" I noticed the line :
>> stat("/usr/share/blender/2.55/config", 0x7fff780c0180) = -1 ENOENT (No such file or directory)
>> Looking at the blender.org x86_64 linux 2.54 tarball I noticed a directory /usr/share/blender/2.54/cfg and /usr/share/blender/2.54/config
>> were present but empty and have even tried creating them, what are their purpose?
>> So far I've changed from moving blender/%version/datafiles/locale to /usr/share/locale which is where the language files should reside to
>> using lndir to populate locale/ with symbolic links to the language files.
>>
>> At this stage after using strace a few times I've rebuilt blender with /usr/share/locale containing symlinks to the contents of
>> /usr/share/blender/2.55/datafiles/locale
>> Here is the output of strace when it locates /usr/share/blender/2.55/datafiles note. I've renamed my ~/.blender directory deliberately :
>>
>> stat("/home/davepl/.thumbnails/normal/", {st_mode=S_IFDIR|0755, st_size=32768, ...}) = 0
>> stat("/home/davepl/.thumbnails/fail/blender/", {st_mode=S_IFDIR|0755, st_size=6, ...}) = 0
>> stat("/usr/bin/2.55/datafiles/locale", 0x7fff729a53e0) = -1 ENOENT (No such file or directory)
>> stat("/home/davepl/.blender/2.55/datafiles/locale", 0x7fff729a54c0) = -1 ENOENT (No such file or directory)
>> stat("/data/src/osc/home:plater:blender/blender/release/datafiles/locale", 0x7fff729a51e0) = -1 ENOENT (No such file or directory)
>> stat("/usr/bin/release/datafiles/locale", 0x7fff729a51e0) = -1 ENOENT (No such file or directory)
>> stat("/usr/share/blender/2.55/datafiles/locale", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
>> stat("/usr/bin/2.55/config", 0x7fff729a52b0) = -1 ENOENT (No such file or directory)
>> stat("/home/davepl/.blender/2.55/config", 0x7fff729a5390) = -1 ENOENT (No such file or directory)
>> brk(0x1c93000)                          = 0x1c93000
>> brk(0x1cb6000)                          = 0x1cb6000
>> brk(0x1cdc000)                          = 0x1cdc000
>> brk(0x1d04000)                          = 0x1d04000
>> brk(0x1d25000)                          = 0x1d25000
>> brk(0x1d46000)                          = 0x1d46000
>> brk(0x1d69000)                          = 0x1d69000
>> open("/proc/meminfo", O_RDONLY)         = 4
>> fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
>> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f61341f9000
>> read(4, "MemTotal:        1012340 kB\nMemF"..., 1024) = 1024
>> close(4)                                = 0
>>
>> And the following :
>>
>> stat("/usr/share/blender/2.55/config", 0x7fff729a50a0) = -1 ENOENT (No such file or directory)
>>
>> "/usr/share/blender/2.55/config" isn't created by make install at all
>>
>> next more location of the "datafiles" directory:
>>
>> stat("/usr/bin/2.55/datafiles", 0x7fff729a4f30) = -1 ENOENT (No such file or directory)
>> stat("/home/davepl/.blender/2.55/datafiles", 0x7fff729a5010) = -1 ENOENT (No such file or directory)
>> stat("/data/src/osc/home:plater:blender/blender/release/datafiles", 0x7fff729a4d30) = -1 ENOENT (No such file or directory)
>> stat("/usr/bin/release/datafiles", 0x7fff729a4d30) = -1 ENOENT (No such file or directory)
>> stat("/usr/share/blender/2.55/datafiles", {st_mode=S_IFDIR|0755, st_size=36, ...}) = 0
>> stat("/usr/share/blender/2.55/datafiles/", {st_mode=S_IFDIR|0755, st_size=36, ...}) = 0
>> chdir("/usr/share/blender/2.55/datafiles/") = 0
>> open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 8
>> getdents64(8, /* 4 entries */, 32768)   = 112
>> getdents64(8, /* 0 entries */, 32768)   = 0
>> stat("locale", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
>> stat("brushicons", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
>> stat("..", {st_mode=S_IFDIR|0755, st_size=50, ...}) = 0
>> stat(".", {st_mode=S_IFDIR|0755, st_size=36, ...}) = 0
>> close(8)                                = 0
>> socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 8
>> connect(8, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = 0
>> sendto(8, "\2\0\0\0\v\0\0\0\7\0\0\0passwd\0", 19, MSG_NOSIGNAL, NULL, 0) = 19
>> poll([{fd=8, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=8, revents=POLLIN|POLLHUP}])
>> recvmsg(8, {msg_name(0)=NULL, msg_iov(2)=[{"\0\0\0\0\4\0\0", 7}, {"8!\0314a\177\0\0", 8}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC},
>> MSG_CMSG_CLOEXEC) = 0
>> close(8)                                = 0
>> socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 8
>> connect(8, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = 0
>> sendto(8, "\2\0\0\0\1\0\0\0\2\0\0\0000\0", 14, MSG_NOSIGNAL, NULL, 0) = 14
>> poll([{fd=8, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=8, revents=POLLIN|POLLHUP}])
>> read(8, "\2\0\0\0\1\0\0\0\5\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\6\0\0\0"..., 36) = 36
>> read(8, "root\0x\0root\0/root\0/bin/bash\0", 28) = 28
>> close(8)                                = 0
>>
>> I'm now going to build an rpm with only make install and not change or add anything by putting a conditional in the spec file.
>> Still no menu, attaching blenderstrace.txt using this last build and I'll attach that and the last build log to blender  . I can see no
>> attempt to load "/usr/share/blender/2.55/scripts" at all.
>> One good thing, the spec file I'm using has evolved from the blender-2.48 one that I inherited when I took over maintenance of blender for
>> openSUSE and I've picked up a lot that is unnecessary. Last question, the icons in "release/freedesktop/icons/" aren't installed, is there
>> a reason for that.
>> Thanks.
>> Dave Plater
>>
>>
>>
>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
>>
>>     
> Blender doesn't make directories on startup, only when it needs to
> save files there. Saving user defaults for eg creates
> ~/.blender/2.55/config/startup.blend
>
> IMHO blender should fill in the home directory with empty scripts dirs
> like the gimp does, but will leave that for later.
>
> For now ignore "config" dir being searched, its harmless and happens
> because blender doesnt make much distinction between the home dir and
> /usr/share.
>
> It would be good to run this with a debugger and break on BPy_init_modules
> then step through the first function - BLI_get_folder(BLENDER_SCRIPTS,
> "modules") to see why this doesnt even try look for scripts.
>
> The fact blender doesnt look for scripts is highly suspicious... heres
> a log from running blender, filtering for where scripts are found.
>
> strace ./blender 2>&1 | grep -v ENOENT | grep scripts
>
> stat("/opt/blender25/share/blender/2.55/scripts/modules",
> {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> stat("/opt/blender25/share/blender/2.55/scripts/modules",
> {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> stat("/opt/blender25/share/blender/2.55/scripts/modules",
> {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> open("/opt/blender25/share/blender/2.55/scripts/modules/bpy_types.py",
> O_RDONLY) = 10
> open("/opt/blender25/share/blender/2.55/scripts/modules/bpy_types.pyc",
> O_RDONLY) = 11
> stat("/opt/blender25/share/blender/2.55/scripts/modules/bpy_types.py",
> {st_mode=S_IFREG|0644, st_size=23792, ...}) = 0
> stat("/opt/blender25/share/blender/2.55/scripts/modules/bpy",
> {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> stat("/opt/blender25/share/blender/2.55/scripts/modules/bpy/__init__.py",
> {st_mode=S_IFREG|0644, st_size=1981, ...}) = 0
> open("/opt/blender25/share/blender/2.55/scripts/modules/bpy/__init__.py",
> O_RDONLY) = 10
> open("/opt/blender25/share/blender/2.55/scripts/modules/bpy/__init__.pyc",
> O_RDONLY) = 11
> stat("/opt/blender25/share/blender/2.55/scripts/modules/bpy/__init__.py",
> {st_mode=S_IFREG|0644, st_size=1981, ...}) = 0
> stat("/opt/blender25/share/blender/2.55/scripts/modules/bpy",
> {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> stat("/opt/blender25/share/blender/2.55/scripts/modules/bpy",
> {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> --- snip ---
>
>
>   
I'll gdb it tonight, if I can keep my eyes open, otherwise tomorrow morning.
Dave P


More information about the Bf-committers mailing list