SGI: Development

arfing gtk2 - Page 2

Some compilers will let you skip the prototype as long as the compiler sees the function definition before any code that actually calls the function. But the function definition should specify the return type (just as the prototype would) so I'm not sure what the story is. Paste in the function definition and we'll have a look!

_________________
Project:
Movin' on up, toooo the east side
Plan:
World domination! Or something...
Okay, I'm arfing stewpid, thought I'd see how far up the food chain we can go with this thing ... pixman-0.28.2
Code:
cc-1020 cc: ERROR File = ../test/utils.c, Line = 371
The identifier "MAP_ANON" is undefined.

addr = mmap (NULL, n_bytes, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS,
^

^ Oops, edited myself instead of making a new post. Anyway ... ^

_________________
waiting for flight 1203 ...
hamei wrote:
Okay, I'm arfing stewpid, thought I'd see how far up the food chain we can go with this thing ... pixman-0.28.2
Code:
cc-1020 cc: ERROR File = ../test/utils.c, Line = 371
The identifier "MAP_ANON" is undefined.

addr = mmap (NULL, n_bytes, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS,
^



This might be a big one; anonymous maps are, AFAICR, not available on IRIX. Note however that it's in ../test/, you might get away with just ignoring the tests.

_________________
:Octane: halo , oct ane
N.B.: I tend to talk out of my ass. Do not take it too seriously.
That's actually a fairly easy one to fix, too. From my own notes from building a custom pixman, the autoconf test is broken (again!). It checks for mprotect and mmap functions, and then assumes that means that MAP_ANONYMOUS is available...which it isn't on IRIX. So you need to manually set ac_cv_func_mprotect=no by prepending it to the configure command. Try:
Code:
ac_cv_func_mprotect=no ./configure --prefix=/usr/nekoware ...


EDIT: I see duck posted while I was writing my response. I should point out that in general, he's right about MAP_ANONYMOUS potentially being a big problem on IRIX. It's probably only in the specific case of pixman that my suggestion applies, since pixman will then use alternate code after the configuration change.

_________________
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500
HP C8000
hamei wrote:
Code:
cc-1020 cc: ERROR File = ../test/utils.c, Line = 371
The identifier "MAP_ANON" is undefined.

addr = mmap (NULL, n_bytes, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS,
^

This is a bit trickier to fix, since IRIX doesn't have MAP_ANON. The first comment here shows you how to fix this.

So, instead of using -1 as the file descriptor and MAP_ANON in the flags, you manually open /dev/zero (mfd in that comment is an int) and use that file descriptor. You should also close() that file descriptor after the munmap() call, otherwise it will leak resources if it's called too often.

EDIT: I see we really jumped on this one :D
ShadeOfBlue wrote:
This is a bit trickier to fix, since IRIX doesn't have MAP_ANON. The first comment here shows you how to fix this.

So, instead of using -1 as the file descriptor and MAP_ANON in the flags, you manually open /dev/zero (mfd in that comment is an int) and use that file descriptor. You should also close() that file descriptor after the munmap() call, otherwise it will leak resources if it's called too often.

EDIT: I see we really jumped on this one :D


Bit of a race condition, hurr hurr...

While not applicable in this case, it's really useful to be able to "emulate" an anonymous map like this... here I was idly pondering using tempfiles or something, thanks for this :-)

_________________
:Octane: halo , oct ane
N.B.: I tend to talk out of my ass. Do not take it too seriously.
Help, Cecil !

I could use a little confirmation of a big quirk from someone with MIPSPro ... or maybe does this with gcc also ?

With the dependencies already in nekoware you can build gtk2 up to at least 2.15.5. It all looks good and it might be my imagination but the presentation looks better - even in MPlayer however in any version 2.13.5 or higher if you try to download a file, fireflop locks up solid, goes unresponsive, doesn't eat any cpu cycles, just goes all zombie. It runs nicely at 2.13.2 but somewhere between 2 and 5 something changes bigtime. I think.

I guess the gnuboys are unlikely to fix any bugs all the way back there, hunh ? I'm wondering if it's something I am doing or a real problem. Confirmation would be welcomed.

_________________
waiting for flight 1203 ...
^ shoot, did it again. That's the trouble with bad habits, they become habitual ^

edit : a little update --

The break appears to be at 2.13.3 ... 2.13.2 works correctly and the appearance is better (carrot carrot). At 2.13.3 and higher (tried all the way to 2.15.5), suddenly rmb-ing to "save as" is totally b0rked. Saving from ftp likewise. Builds nicely, looks good, just has this one slight flaw ....

_________________
waiting for flight 1203 ...
another gtk2 "progress" report ... came across this and thought I'd try it :
some bimbo wrote:
Enter "about:config" in the address bar, look for the "ui.allow_platform_file_picker" key and change its value to "false".

This was actually a post to someone who wanted to change the look of the gtk file handling but hmm, it seemed maybe applicable. So I tried it ...

Works at gtk 2.17.0 now ... except I'm swamped with
Code:

(firefox-bin:166545): Gdk-CRITICAL **: file gdkproperty-x11.c: line 296: assertion `xatom != None' failed

(firefox-bin:166545): Gdk-CRITICAL **: file gdkproperty-x11.c: line 296: assertion `xatom != None' failed

(firefox-bin:166545): Gdk-CRITICAL **: file gdkproperty-x11.c: line 192: assertion `atom != GDK_NONE' failed

whenever I touch a button. Now wondering if it is possible to ditch this lovely 'atom' feature ....

_________________
waiting for flight 1203 ...
Wait. Backed up to 2.13.2 again after realizing that other programs might use the file handling features of gtk2 also. Fireflop has a workaround but nothing else will :(

gtk2 is truly fubar :(

_________________
waiting for flight 1203 ...
Though I'm sure you already know this, to have a nice quiet firefox session where it doesn't barf pointless warning after pointless warning to the console from which you launched it, you can redirect it's stdout and stderr like so:

Code:
firefox 2>/dev/null 1>&2 &

_________________
Project:
Movin' on up, toooo the east side
Plan:
World domination! Or something...
vishnu wrote:
to have a nice quiet firefox session where it doesn't barf pointless warning after pointless warning to the console ...

Like a fool, I keep thinking that maybe one day those pointless messages will provide a clue to why the 'flop crashes.

That's kind of like asking "Why does Mike Tyson hit people ?" but you know how it is ....

_________________
waiting for flight 1203 ...
Have no fear, its End is Nigh!

http://tech.slashdot.org/story/13/07/24/0157210/the-last-guadec .

_________________
:Fuel: redbox 800Mhz 4Gb V12