mupdf - linker cannot find isfinite()

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
jimmer
Donor
Donor
Posts: 446
Joined: Tue Oct 12, 2004 3:54 pm
Location: London, Ingerlund

mupdf - linker cannot find isfinite()

Unread postby jimmer » Mon Jan 23, 2017 5:09 pm

Hey all,

Am reporting this from memory from a PC as redbox is powered down now.

I pulled mupdf from the web a few days ago and attempted to build it with GCC. the 4.7.x one from nekoware. Much to my surprise the compile chugged along nicely, and though I did need to add some defs for NaN and INFINITE and do a little handholding, the compile of the main parts seems to pass pretty painless... Unfortunately, the linker throws a spanner in the works and bails as it tries to find isfinite() symbols.

Perhaps somebody who actually knows what they are doing would consider making/taking some time to look into this?

Many thanks,

J.
:Fuel: redbox 800Mhz 4Gb V12
:O2: bluebox 200Mhz 256Mb AV1+O2Cam

User avatar
dexter1
Moderator
Moderator
Posts: 2726
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands

Re: mupdf - linker cannot find isfinite()

Unread postby dexter1 » Tue Jan 24, 2017 2:13 am

What's the code like? C++ or C?
isfinite() appears in the C99 language definitions, C99 standard (ISO/IEC 9899:1999): 7.12.3.2 The isfinite macro (p: 216-217) to be exact. But IRIX doesn't go that far w.r.t. support for that specific function.

Is there a gcc library you can link against to resolve these external functions like isfinite()?

If you can't do that, maybe you can fudge in an isfinite() macro pulled from somewhere else, or use finite() since that is in IRIX libc. This give +1 on a finite number and 0 if the number is +-INF or a NAN
:Crimson: :PI: :Indigo: :O2: :Indy: :Indigo2: :Indigo2IMP:

User avatar
foetz
Moderator
Moderator
Posts: 6529
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: mupdf - linker cannot find isfinite()

Unread postby foetz » Tue Jan 24, 2017 3:12 am

jimmer wrote:though I did need to add some defs for NaN and INFINITE and do a little handholding, the compile of the main parts seems to pass pretty painless... Unfortunately, the linker throws a spanner in the works and bails as it tries to find isfinite() symbols.

if you added a workaround for isfinite() you have to remove all calls to isfinite() as well as all prototypes to avoid linker errors.

User avatar
Hakimoto
Moderator
Moderator
Posts: 2580
Joined: Sun Mar 30, 2003 4:29 am
Location: Nijmegen, Netherlands, Europe
Contact:

Re: mupdf - linker cannot find isfinite()

Unread postby Hakimoto » Tue Jan 24, 2017 6:21 am

mupdf is a beautiful pdf viewer. I've been using it for a number of years now. Would certainly be lovely if you get it running on IRIX. Keep in mind, though, it's a pure viewer. Keyboard-driven and no printing or other "useless" functions. ;P
The Bandito wrote:In a few years, no doubt, you'll be able to buy a computer,
software and operating system that will match the capabilities
of your current Amiga at about the price you paid for the
Amiga way back when. But you can smile to yourself, knowing
that you were touching the future years before the rest of
the world. And that other computers and operating systems
will do with brute force what the Amiga did years before with
grace, elegance and style.


Eroteme.ch - my end of the internet...

User avatar
jimmer
Donor
Donor
Posts: 446
Joined: Tue Oct 12, 2004 3:54 pm
Location: London, Ingerlund

Re: mupdf - linker cannot find isfinite()

Unread postby jimmer » Wed Jan 25, 2017 8:48 am

Well, for a change I have some good news.

With the help of the lovely MuPDF people on irc.freenode.net I've managed to build MuPDF cleanly on IRIX. Big up to them for the help.

The other bit of good news is that MuPDF seems to be faster than xpdf. By OMG! levels of faster. And it does CBZ, EPUB and other sexy stuffs. It's just bettah.

Not sure where I'm taking this from here. I guess I should look into adding some UI to the bare x11 'example' which they provide in the tarball.

J.

PS. I stopped the compile at the x11 portion. I did not build the OpenGL-based example viewer.
:Fuel: redbox 800Mhz 4Gb V12
:O2: bluebox 200Mhz 256Mb AV1+O2Cam

User avatar
foetz
Moderator
Moderator
Posts: 6529
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: mupdf - linker cannot find isfinite()

Unread postby foetz » Wed Jan 25, 2017 9:25 am

jimmer wrote:Well, for a change I have some good news.

With the help of the lovely MuPDF people on irc.freenode.net I've managed to build MuPDF cleanly on IRIX.

that's great. would you also share these insights and maybe even the resulting binary?

User avatar
jimmer
Donor
Donor
Posts: 446
Joined: Tue Oct 12, 2004 3:54 pm
Location: London, Ingerlund

Re: mupdf - linker cannot find isfinite()

Unread postby jimmer » Wed Jan 25, 2017 11:05 am

Made a little tardist. Where to upload? It's 35Mb.

User avatar
foetz
Moderator
Moderator
Posts: 6529
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: mupdf - linker cannot find isfinite()

Unread postby foetz » Wed Jan 25, 2017 11:31 am

ftp.nekochan.net/incoming

User avatar
jimmer
Donor
Donor
Posts: 446
Joined: Tue Oct 12, 2004 3:54 pm
Location: London, Ingerlund

Re: mupdf - linker cannot find isfinite()

Unread postby jimmer » Thu Jan 26, 2017 2:35 pm

Done. And Nekonoko has kindly moved the simple tardist I made of stock MuPDF-x11 1.10a here:

ftp://ftp.nekochan.net/pub/downloads/contrib/jimmer

Hope this works for somebody :)


Return to “SGI: Development”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest