Gentoo Linux Ebuild

4 messages BitcoinTalk Satoshi Nakamoto, BioMike, mizerydearia August 27, 2010 — August 27, 2010
Satoshi Nakamoto August 27, 2010 00:49 UTC Source ·

Try -datadir=

Last time I tried $(shell /usr/bin/wx-config), there was immediate hollering about build problems with it.  There wasn’t time to investigate at the time.

One problem with $(shell /usr/bin/wx-config) is it will pick up any version (wx 2.8 ) and any configuration (non-UTF-8 ) of wxWidgets that happens to be there.  -lwx_gtk2ud-2.9 only matches the right configuration.  It fails if wxWidgets was built with the wrong configuration.

Iirc, chatting in #wxwidgets on freenode, the devs there were baffled why that was used.

Did they say why they were baffled?

This is because on my system the path is /usr/include/wx-2.9/wx/wx.h

Why is it there?  Was it included by the OS, or did you have to build it?  If you built it, I wonder why it would put itself in a different place.

Has wxWidgets 2.9 finally started to become available as a debian package?

Maybe we should do this:

INCLUDEPATHS= <br>  -I”/usr/local/include/wx-2.9” <br>  -I”/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9” <br>  -I”/usr/include/wx-2.9” <br>  -I”/usr/lib/wx/include/gtk2-unicode-debug-static-2.9”

Again, those paths help make sure it’s only 2.9 and will fail with 2.8.

wxWidgets 2.8 comes in ANSI and UTF-16, both wrong for us.  It’s tempting because it’s so easily available as a package; a lot of people were frustrated by it until we started hardcoding 2.9 into the makefile.

BioMike August 27, 2010 05:22 UTC Source ·

Some things:

  1. Remind that you will need to fix the header.
  2. wxgtk is only needed when building the gui, not the daemon (make that use flag dependable)
  3. gtk+ is then dependency of wxgtk, don’t ask for it yourself.
  4. Check other programs if and how they use wxwidgets through eselect (you can have 2.6 and 2.8 slotted on the same system, you will need 2.9)
  5. /home/bticoin?
  6. Strip optimizations from the Makefile and let the user provide them (or strip them properly)
  7. Don’t build static code. I have a Makefile that builds dynamic code. If you want I can send it to you. You will need to make changes to it.

Valuable reading material: http://devmanual.gentoo.org/ http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml

mizerydearia August 27, 2010 08:03 UTC Source ·
Quote from: satoshi on August 27, 2010, 12:49:43 AM UTC

Last time I tried $(shell /usr/bin/wx-config), there was immediate hollering about build problems with it. There wasn’t time to investigate at the time.

One problem with $(shell /usr/bin/wx-config) is it will pick up any version (wx 2.8 ) and any configuration (non-UTF-8 ) of wxWidgets that happens to be there. -lwx_gtk2ud-2.9 only matches the right configuration. It fails if wxWidgets was built with the wrong configuration.

For reference purpose, Gentoo has the following work-around for specific wxWidgets versions:

$ eselect wxwidgets list
Available wxWidgets profiles:
  [1]   gtk2-ansi-release-2.6
  [2]   gtk2-unicode-2.9 *
  [3]   gtk2-unicode-release-2.6
  [4]   gtk2-unicode-release-2.8

$ /usr/bin/wx-config —version 2.9.1

# eselect wxwidgets set 1

Setting wxWidgets profile to gtk2-ansi-release-2.6

$ /usr/bin/wx-config —version 2.6.4 I’m not sure about other distros though.

Quote from: satoshi on August 27, 2010, 12:49:43 AM UTC

This is because on my system the path is /usr/include/wx-2.9/wx/wx.h

Why is it there? Was it included by the OS, or did you have to build it? If you built it, I wonder why it would put itself in a different place.

From bonsaikitten on IRC:

<bonsaikitten> necrodearia: it is there because that's the correct location
<bonsaikitten> necrodearia: it is not in /usr/local because that's not the correct location
<bonsaikitten> further questions might be resolved by reading FHS

http://www.pathname.com/fhs/

Gentoo Linux is designed so that all (99.99%) packages are compiled from source, so yes, I compiled wxGTK using an ebuild from Portage, the Gentoo Linux package management software.

Quote from: BioMike on August 27, 2010, 5:22:35 AM UTC
  1. Remind that you will need to fix the header.

I don’t understand this. Which header?

Quote from: BioMike on August 27, 2010, 5:22:35 AM UTC
  1. /home/bticoin?

I don’t see where I misspelled bitcoin. Which file?

Quote from: BioMike on August 27, 2010, 5:22:35 AM UTC
  1. Strip optimizations from the Makefile and let the user provide them (or strip them properly)

I am uncertain what “optimizations” are.

Quote from: BioMike on August 27, 2010, 5:22:35 AM UTC
  1. Don’t build static code. I have a Makefile that builds dynamic code. If you want I can send it to you. You will need to make changes to it.

I am not familiar with which parts of code are static and could be converted to dynamic. I only prepared an ebuild because it seems nobody else has. I am not skilled enough to perfect the ebuild, however, if anyone else would like to contribute towards making it better, I set up a git repository: http://github.com/mizerydearia/bitcoin_gentoo_ebuild

BioMike August 27, 2010 18:52 UTC Source ·
Quote from: mizerydearia on August 27, 2010, 8:03:27 AM UTC
Quote from: BioMike on August 27, 2010, 5:22:35 AM UTC
  1. Remind that you will need to fix the header.

I don’t understand this. Which header?

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/lightblue/lightblue-0.4.ebuild,v 1.3 2010/03/27 17:57:36 arfrever Exp $

That header 😉

Quote from: mizerydearia on August 27, 2010, 8:03:27 AM UTC
Quote from: BioMike on August 27, 2010, 5:22:35 AM UTC
  1. /home/bticoin?

I don’t see where I misspelled bitcoin. Which file?

My mistake. I meant to write /home/bitcoin. My point is that this should be /var/lib/bitcoin.

Quote from: mizerydearia on August 27, 2010, 8:03:27 AM UTC
Quote from: BioMike on August 27, 2010, 5:22:35 AM UTC
  1. Strip optimizations from the Makefile and let the user provide them (or strip them properly)

I am uncertain what “optimizations” are.

Things like “-msse2 -O3 -march=amdfam10”. Gentoo users normally specify them themselves in /etc/make.conf.

Quote from: mizerydearia on August 27, 2010, 8:03:27 AM UTC
Quote from: BioMike on August 27, 2010, 5:22:35 AM UTC
  1. Don’t build static code. I have a Makefile that builds dynamic code. If you want I can send it to you. You will need to make changes to it.

I am not familiar with which parts of code are static and could be converted to dynamic. I only prepared an ebuild because it seems nobody else has. I am not skilled enough to perfect the ebuild, however, if anyone else would like to contribute towards making it better, I set up a git repository: http://github.com/mizerydearia/bitcoin_gentoo_ebuild

I can help you with that. One other thing that might be nice is an init.d script to start and stop the daemon at boot. oh… it’s already there.