Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] qalculate-gtk-0.9.7 make error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Sun Dec 16, 2018 1:48 pm    Post subject: [SOLVED] qalculate-gtk-0.9.7 make error Reply with quote

This is more of a shot in the dark, 0.9.7 is an old (2010) version, may be impossible to solve due to too recent versions of other packages.
Build output. If you want to try, the source tarball can be downloaded from the project's old SourceForge page.
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.


Last edited by Marcih on Sun Dec 16, 2018 6:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30888
Location: here

PostPosted: Sun Dec 16, 2018 2:23 pm    Post subject: Reply with quote

0.9.7 very different from 0.9.9?
This because 0.9.9 version is present in official tree
Code:
* sci-calculators/qalculate-gtk
     Available versions:  0.9.9 ~2.2.0 ~2.8.1 {gnome}
     Homepage:            https://qalculate.github.io/
     Description:         Modern multi-purpose calculator

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Sun Dec 16, 2018 4:19 pm    Post subject: Reply with quote

fedeliallalinea wrote:
0.9.7 very different from 0.9.9?
This because 0.9.9 version is present in official tree

Very. Version 0.9.8 was a massive new release, 6 years after 0.9.7 was released. Most notable change was the porting to GTK+3, a general UI tweak and lots of bugfixing. Changelog
That's why I don't have my hopes up about getting it to compile. :lol:
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Sun Dec 16, 2018 6:04 pm    Post subject: Reply with quote

I should take a break from posting to the support sections here, my help requests have been quite embarassing lately... :lol:

I got it to compile in the end, had to MacGyver a whole bunch of things together:
    - try to compile libqalculate-0.9.7
    - find out it doesn't compile on GCC >=6, unmask and emerge gcc:5.4.0
    - qalculate's config script not being able to recognise the library, had to set the env vars QALCULATE_LIBS and QALCULATE_CFLAGS
    - qalculate's binary looking for libqalculate.so.5 in /usr/lib64, but the lib was in /usr/local/lib64 - symlink time

But it runs! :!:
I'll have to try and cook my own ebuilds for those versions of qalculate and libqalculate, this was one ugly install and I'll probably never be able to clean this up.
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Sun Dec 16, 2018 6:59 pm    Post subject: Reply with quote

Marcih wrote:
I should take a break from posting to the support sections here, my help requests have been quite embarassing lately... :lol:

I got it to compile in the end, had to MacGyver a whole bunch of things together:
    - try to compile libqalculate-0.9.7
    - find out it doesn't compile on GCC >=6, unmask and emerge gcc:5.4.0
    - qalculate's config script not being able to recognise the library, had to set the env vars QALCULATE_LIBS and QALCULATE_CFLAGS
    - qalculate's binary looking for libqalculate.so.5 in /usr/lib64, but the lib was in /usr/local/lib64 - symlink time

But it runs! :!:
I'll have to try and cook my own ebuilds for those versions of qalculate and libqalculate, this was one ugly install and I'll probably never be able to clean this up.


It might compile with gcc 6 and up, but would probably need a -std= flag (select either c89, c90, c99 or c11) to make it behave like an older compiler.

I've stayed with an early version of galculator (because it's the last gtk+ 2 version, thankfully I haven't had to try and recompile it)
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Sun Dec 16, 2018 7:20 pm    Post subject: Reply with quote

Anon-E-moose wrote:
It might compile with gcc 6 and up, but would probably need a -std= flag (select either c89, c90, c99 or c11) to make it behave like an older compiler.

Thanks for the tip, I'll be sure to try that out. Good to see you in any discussion about clinging onto GTK+2 for dear life. :lol:

How would I set those flags? Is it just a CFLAG? How would I set it in the ebuild? I've managed to clean up the mess quite quickly and modifying the 0.9.9 ebuild to fit 0.9.7 was equally easy, I've both qalculate-0.9.7 and libqalculate-0.9.7 now officially in my local overlay. 8)
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Sun Dec 16, 2018 7:45 pm    Post subject: Reply with quote

Marcih wrote:
Anon-E-moose wrote:
It might compile with gcc 6 and up, but would probably need a -std= flag (select either c89, c90, c99 or c11) to make it behave like an older compiler.

Thanks for the tip, I'll be sure to try that out. Good to see you in any discussion about clinging onto GTK+2 for dear life. :lol:

How would I set those flags? Is it just a CFLAG? How would I set it in the ebuild? I've managed to clean up the mess quite quickly and modifying the 0.9.9 ebuild to fit 0.9.7 was equally easy, I've both qalculate-0.9.7 and libqalculate-0.9.7 now officially in my local overlay. 8)


https://wiki.gentoo.org/wiki/Knowledge_Base:Overriding_environment_variables_per_package

They talk about per package, but you can set it for per package version by using the = sign and a a version number, inside package.env

So you would have something like
Code:
echo 'CFLAGS="${CFLAGS} -std=c89"' > /etc/portage/env/old-std-flags
or whatever name you want to use

then in package.env
Code:
=qalculate-gtk-0.9.7 old-std-flags
or whatever you named the file above.

Note: I've done similar things, but not this exact one, so this is all off the top of my head ;)
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Sun Dec 16, 2018 7:58 pm    Post subject: Reply with quote

Thanks, so:
Code:
$ cat /etc/portage/env/sim-old-gcc
CFLAGS="${CFLAGS} -std=$FLAG"
$ cat /etc/portage/package.env
=sci-libs/libqalculate-0.9.7 sim-old-gcc
=sci-calculators/qalculate-gtk-0.9.7 sim-old-gcc

What should $FLAG be? After a quick skim though some sites, it seems that GCC is by default -std=gnuXY instead of -std=cXY. What about CXXFLAGS?
EDIT: gnu11 and gnu++98 seem to be the default in 5.4.0 according to the man page, as opposed to gnu11 and gnu++14 in 7.3.0.
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Sun Dec 16, 2018 8:10 pm    Post subject: Reply with quote

I wouldn't worry about CXXFLAGS unless you're compiling c++ code, if so there is a corresponding setting for c++.

https://www.gnu.org/software/gcc/projects/cxx-status.html

Or google gcc -std flags and see what pops up

ETA: Your edit from the above post looks about right. ( gnu11 and gnu++98 )

CFLAGS -- c98 or gnu98, or c11 or gnu11
CXXFLAGS -- c++98 or gnu++98 or c++11 or gnu++11

ETA2: C flags https://gcc.gnu.org/onlinedocs/gcc/Standards.html
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Sun Dec 16, 2018 8:50 pm    Post subject: Reply with quote

Interesting reads, bookmarked. :)

It must be that Qalculate has at least parts written in C++ since that is the std flag that changed from 5.4.0 to >=6.
Anyways, I've set the env var for the two packages to gnu11 and gnu++98, switched to 7.3.0 and they compile. I am a happy Gentooer. :D
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum