Pages:
Author

Topic: Gentoo Linux Ebuild - page 2. (Read 21578 times)

full member
Activity: 146
Merit: 100
October 22, 2010, 06:39:18 PM
#45

EDIT : for now forget about this bugreport, theres something weird on this server and the problem could be unrelated with the ebuild, I m investigating and  will update this within 24-48 hours.


Yes, a complete strace would be more useful. I don't see anything strange in this part.
Did you also try ebuilds before 0.3.13, did they give issues?

Also give a bit more information about your system (is is x86 or ~x86 for example).

 nop tried only 0.3.13 and 0.3.14 until now, dont know how to get older ebuilds with git ;(

 the system is x86 but I added
Code:
=net-p2p/bitcoin-0.3.14 ~x86

in /etc/portage/package.keywords

 also all my servers are gentoo hardened / grsec, but i m 99% its not related ( no grsec log message concerning bitcoind, its just a segfault, nothing more, and bitcoind is running on other dedicate servers )

 since the strace can contain sensitive information I d prefer not to put it publicly here, could you send me a PM with you email or come on the #bitcoin-dev IRC channel ?

legendary
Activity: 1658
Merit: 1001
October 22, 2010, 04:16:13 PM
#44

(  I can provide the complete strace if needed )

 this is true with the 2 last ebuilds, 0.3.13 and 0.3.14

 NOTE : the BINARY 32/bitcoind is running well on the same ATOM CPU server



Yes, a complete strace would be more useful. I don't see anything strange in this part.
Did you also try ebuilds before 0.3.13, did they give issues?

Also give a bit more information about your system (is is x86 or ~x86 for example).
full member
Activity: 146
Merit: 100
October 22, 2010, 10:15:35 AM
#43
 for information the ebuild is working perfectly on my intel servers, but not working on a ATOM CPU :

Code:
+++ killed by SIGSEGV +++
Segmentation fault

 Logs :

Code:
Oct 22 15:41:46 mx kernel: bitcoind[32466]: segfault at 3042924 ip 161ab4c0 sp 452fed50 error 4 in bitcoind[1614b000+13b000]
Oct 22 15:42:04 mx kernel: bitcoind[32648]: segfault at 1042924 ip 1272d4c0 sp 4f0fad50 error 4 in bitcoind[126cd000+13b000]
Oct 22 15:43:03 mx kernel: bitcoind[32730]: segfault at 2042924 ip 16eea4c0 sp 4a9fad50 error 4 in bitcoind[16e8a000+13b000]
Oct 22 15:46:26 mx kernel: bitcoind[753]: segfault at 1042924 ip 143244c0 sp 46ffed50 error 4 in bitcoind[142c4000+13b000]

CPU :

Code:
mx bitcoin_gentoo_ebuild # cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU  330   @ 1.60GHz
stepping        : 2
cpu MHz         : 1596.057
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm
bogomips        : 3192.11
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU  330   @ 1.60GHz
stepping        : 2
cpu MHz         : 1596.057
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 2
initial apicid  : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm
bogomips        : 3192.29
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU  330   @ 1.60GHz
stepping        : 2
cpu MHz         : 1596.057
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm
bogomips        : 3192.27
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 28
model name      : Intel(R) Atom(TM) CPU  330   @ 1.60GHz
stepping        : 2
cpu MHz         : 1596.057
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 3
initial apicid  : 3
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm
bogomips        : 3192.30
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 48 bits virtual
power management:

Code:
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

end of the strace :

Code:
stat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(11)                               = 0
munmap(0x515e5000, 4096)                = 0
gettimeofday({1287755265, 385568}, NULL) = 0
time(NULL)                              = 1287755265
time(NULL)                              = 1287755265
mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x50de5000
mprotect(0x50de5000, 4096, PROT_NONE)   = 0
clone(child_stack=0x515e5484, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x515e5bd8, {entry_number:6, base_addr:0x515e5b70, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0x515e5bd8) = 832
mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x505e4000
mprotect(0x505e4000, 4096, PROT_NONE)   = 0
clone(child_stack=0x50de4484, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x50de4bd8, {entry_number:6, base_addr:0x50de4b70, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0x50de4bd8) = 833
gettimeofday({1287755265, 386429}, NULL) = 0
gettimeofday({1287755265, 386521}, NULL) = 0
nanosleep({999, 999908000}, 

(  I can provide the complete strace if needed )

 this is true with the 2 last ebuilds, 0.3.13 and 0.3.14

 NOTE : the BINARY 32/bitcoind is running well on the same ATOM CPU server

legendary
Activity: 1658
Merit: 1001
October 21, 2010, 05:47:47 PM
#42
bitcoin-0.3.14.ebuild is on github.
full member
Activity: 146
Merit: 100
October 18, 2010, 04:57:20 PM
#41
 I updated the ebuild with git, but you ll have to rebuild the manifest in the ebuild :

Code:
!!! Digest verification failed:
!!! /usr/local/portage/net-p2p/bitcoin/files/Makefile.gentoo
!!! Reason: Filesize does not match recorded size

 I did it :
Code:
cd net-p2p/bitcoin/
ebuild bitcoin-0.3.13.ebuild manifest
Appending /root/bitcoin_gentoo_ebuild to PORTDIR_OVERLAY...
>>> Creating Manifest for /root/bitcoin_gentoo_ebuild/net-p2p/bitcoin
cp -af net-p2p/ /usr/local/portage/
emerge bitcoin

 and it WORKS !

Code:
 * Enabling SSE2 code
>>> Source prepared.

many thanks biomike !

now building, I ll give more feedback later
legendary
Activity: 1658
Merit: 1001
October 18, 2010, 02:12:08 PM
#40
I see my Makefile.gentoo got reverted to an older version, caused by an update by mizerydearea. That is causing the problem.

I'll see if I can get my version in again.

Corrected Makefile.gentoo is in github again
legendary
Activity: 1470
Merit: 1005
Bringing Legendary Har® to you since 1952
October 18, 2010, 09:37:01 AM
#39
Never mind my previous post.

I've studied the code of the ebuild and i know what the @@GENTOO_CFLAGS_SSE2@@ is.

This "@@GENTOO_CFLAGS_SSE2@@" gets replaced by "-DFOURWAYSSE2" by emerge, which is defined in the ebuild. If it is not replaced, something wrong is going on with the ebuild.

My advice: try the older version (as it worked for me).
legendary
Activity: 1470
Merit: 1005
Bringing Legendary Har® to you since 1952
October 18, 2010, 09:17:31 AM
#38
I think You should ask this question at Gentoo Forums as it seems that Your Gentoo is misconfigured somehow.

They will know why is Your SSE2 variable not set.

BTW,
Did You do $ env-update && source /etc/profile as root after changing your CFLAGS ?
Alternatively, You may restart Your computer - that should work too.
full member
Activity: 146
Merit: 100
October 18, 2010, 06:32:55 AM
#37
my CPU is :

model name     : Intel(R) Core(TM)2 Duo CPU     E6550  @ 2.33GHz
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr lahf_lm

should have this sse2 support according to the flags

EDIT :

 same problem after changing my CFLAGS  ;(

 I tried :

CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

and

CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"

I think that Your cflags are wrong (too general). You need to set them for specifically Your processor type, so SSE2 will be detected and set.
But i might be wrong.

Code:
CFLAGS="-O2 -mtune=i686 -pipe"
declare -x CXXFLAGS="-O2 -mtune=i686 -pipe"

Look at mine in comparison:

Code:
CFLAGS="-march=k8 -O2 -pipe"
CXXFLAGS="-march=k8 -O2 -pipe"

Those are set specifically for AMD64 processor with SSE2 support.
Another thing is that perhaps Your processor does not support SSE2 ?

You could post Your hardware specs.

----
EDIT:
Also, here are lists for safe Gentoo CFLAGS for every Intel/AMD processor:
http://en.gentoo-wiki.com/wiki/Safe_Cflags/AMD
http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel
legendary
Activity: 1470
Merit: 1005
Bringing Legendary Har® to you since 1952
October 18, 2010, 06:05:43 AM
#36
I think that Your cflags are wrong (too general). You need to set them for specifically Your processor type, so SSE2 will be detected and set.
But i might be wrong.

Code:
CFLAGS="-O2 -mtune=i686 -pipe"
declare -x CXXFLAGS="-O2 -mtune=i686 -pipe"

Look at mine in comparison:

Code:
CFLAGS="-march=k8 -O2 -pipe"
CXXFLAGS="-march=k8 -O2 -pipe"

Those are set specifically for AMD64 processor with SSE2 support.
Another thing is that perhaps Your processor does not support SSE2 ?

You could post Your hardware specs.

----
EDIT:
Also, here are lists for safe Gentoo CFLAGS for every Intel/AMD processor:
http://en.gentoo-wiki.com/wiki/Safe_Cflags/AMD
http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel
legendary
Activity: 1470
Merit: 1005
Bringing Legendary Har® to you since 1952
October 18, 2010, 05:36:28 AM
#35
Clearly i can see that Your makefile is not reading the @@GENTOO_CFLAGS_SSE2@@ variable.
Another question is, WHY.

I am using exactly the same ebuild as You are and everything works.

Perhaps something is wrong with Your cflags. Check make.conf. perhaps You should add processor type/architecture to the $CFLAGS variable.

----
You can post Your make.conf here, i will take a look at it.


----
EDIT: Correction, I'm not using the same ebuild as You, I'm using its older version.
Perhaps something broke later ?
full member
Activity: 146
Merit: 100
October 18, 2010, 05:09:05 AM
#34
bitcoin-0.3.13 ebuild is now available. Made some small changes in the process (bitcoin is C++, so renamed the CFLAGS to CXXFLAGS).

Have fun.

 hi,

 I m new to bitcoin and have just built bitcoin on my gentoo using your ebuild :
http://github.com/mizerydearia/bitcoin_gentoo_ebuild/tree/master

 I use gentoo for years but never had to use a custom ebuild until now, so I had to search how to use it .

 My small contribution for the next one wanted to test bitcoin on gentoo, I just did :

 First I added in make.conf :
Code:
 PORTDIR_OVERLAY=/usr/local/portage
to be able to use a custon ebuild

 Then :

Code:
emerge git # install git
git clone http://github.com/mizerydearia/bitcoin_gentoo_ebuild.git #to get the ebuild
cp -af net-p2p /usr/local/portage # put the ebuild in the overlay
emerge -pv bitcoin # check everything is ok and see the default use flags


then  in /etc/portage/package.use :

Code:
=net-p2p/bitcoin-0.3.13  nls sse2 daemon -gui

and in /etc/portage/package.keywords
Code:
=net-p2p/bitcoin-0.3.13         ~x86

 and finally build it :

Code:
emerge -pv bitcoin # check again the useflags
emerge bitcoin # build and install it

but I got :

Code:
>>> Unpacking source...
>>> Unpacking bitcoin-0.3.13-linux.tar.gz to /var/tmp/portage/net-p2p/bitcoin-0.3.13/work
>>> Source unpacked in /var/tmp/portage/net-p2p/bitcoin-0.3.13/work
>>> Preparing source in /var/tmp/portage/net-p2p/bitcoin-0.3.13/work/bitcoin-0.3.13 ...
 * Berkeley DB:
include version 4.8
 * Enabling SSE2 code
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/net-p2p/bitcoin-0.3.13/work/bitcoin-0.3.13 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-p2p/bitcoin-0.3.13/work/bitcoin-0.3.13 ...
make bitcoind
g++ -c -O2 -mtune=i686 -pipe -Wno-invalid-offsetof -Wformat @@GENTOO_CFLAGS_SSE2@@ -I"/usr/include" -I"/usr/include/crypto++" -I"/usr/include/db4.8"  -o obj/nogui/util.o util.cpp
g++: @@GENTOO_CFLAGS_SSE2@@: No such file or directory
util.cpp: In function 'void ShrinkDebugFile()':
util.cpp:739: warning: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
make: *** [obj/nogui/util.o] Error 1
 * ERROR: net-p2p/bitcoin-0.3.13 failed:
 *   emake bitcoind failed
 *
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 5203:  Called die
 * The specific snippet of code:
 *           emake bitcoind || die "emake bitcoind failed";
 *
 * If you need support, post the output of 'emerge --info =net-p2p/bitcoin-0.3.13',
 * the complete build log and the output of 'emerge -pqv =net-p2p/bitcoin-0.3.13'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/net-p2p/bitcoin-0.3.13/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-p2p/bitcoin-0.3.13/temp/environment'.
 * S: '/var/tmp/portage/net-p2p/bitcoin-0.3.13/work/bitcoin-0.3.13'

>>> Failed to emerge net-p2p/bitcoin-0.3.13


any ideas ? did I miss something ? should I disable this sse2 ?

full build log : http://paste.pocoo.org/show/276889/
build environment : http://paste.pocoo.org/show/276890/
hero member
Activity: 574
Merit: 507
October 08, 2010, 01:23:05 PM
#33
What github username do you use?  I'll add commit access.
legendary
Activity: 1470
Merit: 1005
Bringing Legendary Har® to you since 1952
October 08, 2010, 04:23:23 AM
#32
I do not have an nVidia gpu and cannot afford to buy anything for the foreseeable future.  If another gentoo user is willing to provide an ebuild for the CUDA client, that would be appreciated.  I can provide access to the github repository if somene is willing to contribute a CUDA ebuild.  Otherwise instead of an entirely separate ebuild, if there are patches (just like the others) that can be applied when "cuda" USEFLAG is enabled, then you're welcome to modify my ebuild as well.

I will contribute a CUDA ebuild, once i get the damn makefile to work.
I guess perhaps this weekend.
newbie
Activity: 7
Merit: 0
October 08, 2010, 04:03:05 AM
#31
As CUDA isn't in the main releases yet, I'm not going to include it (my goal is to get it as stable as possible to get it included into the main gentoo tree). Mizerydearia is taking care of the live ebuild and might want to include it.

Thanks for the replies, getting it into the main tree is indeed a lot more important. Good luck! Smiley
legendary
Activity: 1658
Merit: 1001
October 05, 2010, 02:52:43 AM
#30
 Otherwise instead of an entirely separate ebuild, if there are patches (just like the others) that can be applied when "cuda" USEFLAG is enabled, then you're welcome to modify my ebuild as well.

I think that would be the way to go. If the patches are right you could build it with USE="cuda", but the program would just not use it. People with Cuda hardware could then test it for you.
hero member
Activity: 574
Merit: 507
October 04, 2010, 08:07:55 PM
#29
I do not have an nVidia gpu and cannot afford to buy anything for the foreseeable future.  If another gentoo user is willing to provide an ebuild for the CUDA client, that would be appreciated.  I can provide access to the github repository if somene is willing to contribute a CUDA ebuild.  Otherwise instead of an entirely separate ebuild, if there are patches (just like the others) that can be applied when "cuda" USEFLAG is enabled, then you're welcome to modify my ebuild as well.
legendary
Activity: 1658
Merit: 1001
October 04, 2010, 05:13:53 PM
#28
As CUDA isn't in the main releases yet, I'm not going to include it (my goal is to get it as stable as possible to get it included into the main gentoo tree). Mizerydearia is taking care of the live ebuild and might want to include it.
newbie
Activity: 7
Merit: 0
October 04, 2010, 02:13:54 PM
#27
Any chance of a CUDA use flag, maybe restricted to a certain revision? Grin
legendary
Activity: 1658
Merit: 1001
October 01, 2010, 02:32:15 AM
#26
bitcoin-0.3.13 ebuild is now available. Made some small changes in the process (bitcoin is C++, so renamed the CFLAGS to CXXFLAGS).

Have fun.
Pages:
Jump to: