Bitcoin Forum
December 05, 2016, 12:54:41 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: problem building bitcoin on DragonFly  (Read 1994 times)
phma
Newbie
*
Offline Offline

Activity: 11


View Profile
March 11, 2011, 04:24:45 AM
 #1

I downloaded wxWidgets and compiled it (which took some hacking and a fix to one of the include files in world) and installed it. Then I tried to build Bitcoin and got this error:

g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -D__WXGTK__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -I"/usr/local/include/wx-2.9" -I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9" -DGUI -o obj/util.o util.cpp
In file included from /usr/local/include/wx-2.9/wx/defs.h:26,
                 from /usr/local/include/wx-2.9/wx/wx.h:15,
                 from headers.h:30,
                 from util.cpp:5:
/usr/local/include/wx-2.9/wx/platform.h:256:22: error: wx/setup.h: No such file or directory
In file included from /usr/local/include/wx-2.9/wx/platform.h:711,
                 from /usr/local/include/wx-2.9/wx/defs.h:26,
                 from /usr/local/include/wx-2.9/wx/wx.h:15,
                 from headers.h:30,
                 from util.cpp:5:
/usr/local/include/wx-2.9/wx/chkconf.h:94:9: error: #error "wxUSE_ANY must be defined, please read comment near the top of this file."

This is only the start of several screenfuls of errors ending with gmake giving up. Did I misinstall wxWidgets?

I also notice that makefile.unix has hardcoded paths in /usr/local/include/. If wxWidgets were installed as a package, the include files would be in /usr/include or /usr/pkg/include, depending on the package manager. Could you set the build process up with cmake or autotools so that they would find the right include paths?
1480942481
Hero Member
*
Offline Offline

Posts: 1480942481

View Profile Personal Message (Offline)

Ignore
1480942481
Reply with quote  #2

1480942481
Report to moderator
1480942481
Hero Member
*
Offline Offline

Posts: 1480942481

View Profile Personal Message (Offline)

Ignore
1480942481
Reply with quote  #2

1480942481
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
error
Hero Member
*****
Offline Offline

Activity: 574



View Profile
March 11, 2011, 04:49:50 AM
 #2

I completely agree that it should use GNU autoconf or something similar.

In the meantime, you need to set two include paths for wxWidgets in makefile.unix; the first one you got right, but the second one isn't pointing at the correct directory.

15UFyv6kfWgq83Pp3yhXPr8rknv9m6581W
phma
Newbie
*
Offline Offline

Activity: 11


View Profile
March 11, 2011, 06:20:30 AM
 #3

Next problem: It's looking for wx/gtk/chkconf.h. It's actually wx/x11/chkconf.h. I'm going to symlink the directory and see if that works.
phma
Newbie
*
Offline Offline

Activity: 11


View Profile
March 11, 2011, 09:25:00 PM
 #4

It looks like I build wxWidgets wrong. I had to define __WXX11__ instead of __WXGTK__, and Bitcoin still doesn't compile.
phma
Newbie
*
Offline Offline

Activity: 11


View Profile
April 10, 2011, 01:08:51 PM
 #5

I had to change "#ifdef BSD" to "#ifdef SO_NOSIGPIPE" in net.cpp to get it to compile. According to Sascha Wildner, SO_NOSIGPIPE exists on FreeBSD, but not Net, Open, or DragonFly.

It compiled, but did not link. Here are the results:

g++ -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -D__WXGTK__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -I"/usr/local/include/wx-2.9" -I"/usr/pkg/include" -I"/usr/pkg/include/db5" -I"/usr/local/lib/wx/include/gtk2-unicode-static-2.9" -o bitcoin obj/util.o obj/script.o obj/db.o obj/net.o obj/irc.o obj/main.o obj/rpc.o obj/init.o cryptopp/obj/sha.o cryptopp/obj/cpu.o obj/ui.o obj/uibase.o obj/sha256.o -Wl,-Bstatic -l wx_gtk2ud-2.9 -Wl,-Bdynamic -l gtk-x11-2.0 -l Xxf86vm -l SM -Wl,-Bstatic -l boost_system-mt -l boost_filesystem-mt -l boost_program_options-mt -l boost_thread-mt -l db_cxx -l ssl -l crypto -Wl,-Bdynamic -l gthread-2.0 -l z -l dl
/usr/libexec/binutils217/elf/ld: cannot find -lwx_gtk2ud-2.9
gmake: *** [bitcoin] Error 1
[1]   Done                    kwrite config
[2]   Done                    kwrite ./net.cpp
# locate wx_gtk
/usr/local/lib/libwx_gtk2u_adv-2.9.a
/usr/local/lib/libwx_gtk2u_aui-2.9.a
/usr/local/lib/libwx_gtk2u_core-2.9.a
/usr/local/lib/libwx_gtk2u_gl-2.9.a
/usr/local/lib/libwx_gtk2u_html-2.9.a
/usr/local/lib/libwx_gtk2u_media-2.9.a
/usr/local/lib/libwx_gtk2u_propgrid-2.9.a
/usr/local/lib/libwx_gtk2u_qa-2.9.a
/usr/local/lib/libwx_gtk2u_ribbon-2.9.a
/usr/local/lib/libwx_gtk2u_richtext-2.9.a
/usr/local/lib/libwx_gtk2u_stc-2.9.a
/usr/local/lib/libwx_gtk2u_xrc-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_adv-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_aui-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_core-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_gl-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_html-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_media-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_propgrid-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_qa-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_ribbon-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_richtext-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_stc-2.9.a
/usr/local/src/wxWidgets-2.9.1/lib/libwx_gtk2u_xrc-2.9.a
error
Hero Member
*****
Offline Offline

Activity: 574



View Profile
April 10, 2011, 10:37:05 PM
 #6

/usr/libexec/binutils217/elf/ld: cannot find -lwx_gtk2ud-2.9

You're trying dynamic linking, but there are no .so files? Something's wrong with your wxWidgets installation.

15UFyv6kfWgq83Pp3yhXPr8rknv9m6581W
phma
Newbie
*
Offline Offline

Activity: 11


View Profile
April 11, 2011, 10:51:15 AM
 #7

I rebuilt wxWidgets, but still get the error. There are now so files, but not the one it's looking for. I configured it like this:

# ../configure --with-gtk --enable-shared

It outputs this:

Configured wxWidgets 2.9.1 for `i386-unknown-dragonfly2.9'

  Which GUI toolkit should wxWidgets use?                 GTK+ 2 with support for GTK+ printing
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets support Unicode?                       yes (using UTF-8)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.6      no
                                       wxWidgets 2.8      yes
  Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               builtin
                                       png                builtin
                                       regex              builtin
                                       tiff               builtin
                                       zlib               sys
                                       expat              builtin
                                       libmspack          no
                                       sdl                no
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!