summaryrefslogtreecommitdiff
path: root/24/55a3af90846a7c7dd15f6a9e9587dd094633f3
blob: 1d9e9d1aec6084e012e5170a6b40437c5771d391 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194]
	helo=mx.sourceforge.net)
	by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <bitcoin-list@bluematt.me>) id 1QnV4D-0005TU-Ff
	for bitcoin-development@lists.sourceforge.net;
	Sun, 31 Jul 2011 12:24:25 +0000
Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of bluematt.me
	designates 208.79.240.5 as permitted sender)
	client-ip=208.79.240.5; envelope-from=bitcoin-list@bluematt.me;
	helo=smtpauth.rollernet.us; 
Received: from smtpauth.rollernet.us ([208.79.240.5])
	by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256)
	(Exim 4.76) id 1QnV4C-0004HM-HF
	for bitcoin-development@lists.sourceforge.net;
	Sun, 31 Jul 2011 12:24:25 +0000
Received: from smtpauth.rollernet.us (localhost [127.0.0.1])
	by smtpauth.rollernet.us (Postfix) with ESMTP id 4AC6F594123
	for <bitcoin-development@lists.sourceforge.net>;
	Sun, 31 Jul 2011 05:24:05 -0700 (PDT)
Received: from mail.bluematt.me (unknown
	[IPv6:2001:470:9ff2:2:20c:29ff:fe16:f239])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	(Authenticated sender: @bluematt.me)
	by smtpauth.rollernet.us (Postfix) with ESMTPSA
	for <bitcoin-development@lists.sourceforge.net>;
	Sun, 31 Jul 2011 05:24:04 -0700 (PDT)
Received: from [IPv6:2001:470:9ff2:1:2c0:caff:fe33:858b] (unknown
	[IPv6:2001:470:9ff2:1:2c0:caff:fe33:858b])
	by mail.bluematt.me (Postfix) with ESMTPSA id 404AFA00
	for <bitcoin-development@lists.sourceforge.net>;
	Sun, 31 Jul 2011 14:24:15 +0200 (CEST)
From: Matt Corallo <bitcoin-list@bluematt.me>
To: bitcoin-development@lists.sourceforge.net
In-Reply-To: <CAJNQ0suWuaeNCA0MDp6Sef4EE1ibSg=YPVWY93cpqKig_reZXg@mail.gmail.com>
References: <CAJNQ0svOGGZ+L6ffK2RA+wq-VawkdJKeQcjo4_0socLZUpwDyg@mail.gmail.com>
	<CAJNQ0suWuaeNCA0MDp6Sef4EE1ibSg=YPVWY93cpqKig_reZXg@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Date: Sun, 31 Jul 2011 14:24:10 +0200
Message-ID: <1312115050.2325.1.camel@Desktop666>
Mime-Version: 1.0
X-Mailer: Evolution 2.32.2 
Content-Transfer-Encoding: 7bit
X-Rollernet-Abuse: Processed by Roller Network Mail Services. Contact
	abuse@rollernet.us to report violations. Abuse policy:
	http://rollernet.us/abuse.php
X-Rollernet-Submit: Submit ID 502d.4e354964.e0585.0
X-Spam-Score: -1.5 (-)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
	sender-domain
	-0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
	-0.0 SPF_PASS               SPF: sender matches SPF record
X-Headers-End: 1QnV4C-0004HM-HF
Subject: Re: [Bitcoin-development] Unit tests
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Sun, 31 Jul 2011 12:24:25 -0000

On Sun, 2011-07-31 at 11:21 +0000, John Smith wrote:
> 
> BTW, talking about the unit testframework: It doesn't build here by
> default:
> 
> $ make -f makefile.unix test_bitcoin  USE_UPNP=
> 
> g++ -static  -o test_bitcoin  obj/test/test_bitcoin.o -Wl,-Bstatic -l
> boost_system -l boost_filesystem -l boost_program_options -l
> boost_thread -l db_cxx -l ssl -l crypto -Wl,-Bdynamic -l gthread-2.0
> -l z -l dl -l pthread -lboost_unit_test_framework
> /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/crt1.o: In
> function `_start':
> (.text+0x20): undefined reference to `main'
> collect2: ld returned 1 exit status
> make: *** [test_bitcoin] Error 1
> 
> Two ways to fix this:
> 
> 1) Add #define BOOST_TEST_DYN_LINK  to the top of test_bitcoin.cpp.
> This is needed for dynamic linking.
> 
> 2) Link boost_unit_test_framework statically
> 
> test_bitcoin: obj/test/test_bitcoin.o
>         $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -Wl,-Bstatic
> -lboost_unit_test_framework -Wl,-Bdynamic
> 
> (yes, it needs the switch to dynamic again at the end, otherwise
> libgcc will be linked statically which results in an error ...)
> 
> JS

See pull 363 and 442 :)

Matt