Comments (10)
It seems that the CFLAGS addition were due to you using a crosscompiler, however I'll look to incorporating the PATH_MAX & sscanf fixes. Thanks!
from bitc.
On second thought, file.h already #include's <linux/limits.h> to pull PATH_MAX's definition and all the files using PATH_MAX also #include file.h:
[u@foo git/bitc/src]$ grep PATH_MAX *
addrbook.c: char path[PATH_MAX];
block-store.c: char bsPath[PATH_MAX];
file.c: char file0[PATH_MAX];
file.c: char file1[PATH_MAX];
file.h:// PATH_MAX
txdb.c: char txdbPath[PATH_MAX];
util.c: char filePath[PATH_MAX];
[u@foo git/bitc/src]$ grep file.h *
addrbook.c:#include "file.h"
block-store.c:#include "file.h"
config.c:#include "file.h"
file.c:#include "file.h"
main.c:#include "file.h"
txdb.c:#include "file.h"
util.c:#include "file.h"
wallet.c:#include "file.h"
So it's not clear that #including <linux/limits.h> in these files will help.
Also the problem related to ___isoc99_sscanf appears to be due to the use of a non-standard library, so I'm tempted to just punt on this bug.
Note that I've had a report from a bitcointalk user that bitc was compiling & running great on a raspberry pi running raspbian 7.2. So this looks like an issue with your environment.
from bitc.
What user on bitcointalk?
It does not compile cleanly on a fully updated raspbian 7.2, I just tried again.
If I change 'CC = clang' to 'CC = gcc', it still fails:
$ make
CC src/MurmurHash3.c
CC src/addrbook.c
CC src/base58.c
CC src/bitc_ui.c
CC src/block-store.c
CC src/bloom.c
CC src/btc-message.c
CC src/cJSON.c
CC src/config.c
CC src/crypt.c
CC src/file.c
CC src/fx.c
CC src/hash.c
CC src/hashtable.c
CC src/ip_info.c
CC src/key.c
CC src/main.c
src/main.c: In function âmainâ:
src/main.c:1164:9: error: declaration of âgetpassâ shadows a global declaration [-Werror=shadow]
cc1: all warnings being treated as errors
make: *** [bld/main.o] Error 1
from bitc.
This was user "fronti".
What happens if you rename all usages of the variable 'getpass' to 'getpassword'? Does this compile fine? If not, can you give me ssh access to your raspberry pi?
from bitc.
Problem appears to be clang on Pi. The results above included the CFLAGS that you said to comment out.
Here's an attempt at patching the Makefile to use gcc when on a Pi:
--- bitc.1/Makefile 2014-02-21 13:43:59.103515150 -0500
+++ bitc/Makefile 2014-02-25 15:37:24.718274495 -0500
@@ -1,7 +1,13 @@
OS=$(shell uname -s)
+MACH=$(shell uname -m)
+ifeq ($(MACH), armv6l)
+CC = gcc
+else
CC = clang
+endif
+
ASAN = 0
###
@@ -9,8 +15,10 @@
###
CFLAGS = -O1 -MMD -g
+ifeq ($(CC), clang)
CFLAGS += -Wall -Werror -Wshadow
CFLAGS += -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers
+endif
CFLAGS += -fno-omit-frame-pointer
CFLAGS += -fstack-protector
from bitc.
Actually, -Wall -Werror can be left in, it's only -Wgshadow that is a problem.
(Please forgive my noobness).
from bitc.
Should be fixed-up now. Can you please git pull
, then make
and let me know how that goes? Thanks.
from bitc.
Nope... ARCH vs MACH as variable not selecting compiler right, and it only compiles after removing -Wgshadow -Wextra
The errors those flags give:
src/poll.c:75:53: error: declaration of âpollâ shadows a global declaration [-Werror=shadow]
src/poll.c:200:4: error: comparison is always true due to limited range of data type [-Werror=type-limits]
from bitc.
Yes, sorry about that. What about now?
from bitc.
That did it! Nice clean compile :)
Took maybe 2 minutes to startup and get to 'online'.
Now this issues just needs to be marked "fixed" instead of "won't fix" :)
Thanks!
from bitc.
Related Issues (20)
- fix endianness issue
- Testnet function incompatible with bitcoin faucets HOT 1
- Problem with lastHashStore HOT 3
- Create a brew install formula
- clang: not found
- "Blocks" tab uses doesn't show year in date
- testnet address generation and handling HOT 1
- RPC interface
- Dependency issue in OSX Yosemite
- build issue on amd64 (debian testing)
- using too much ram :) HOT 1
- Errors during startup
- Can't find libstdc++
- PANIC: Expression 'buff_space_left(buf) == 0' not TRUE. Abort trap: 6 (core dumped) HOT 2
- Problem with compilation - unused function 'bitc_openssl_lock_fun' HOT 1
- Static build
- disable stack-protector on powerpc HOT 3
- split the core of HOT 2
- building on os x fails after recent changes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitc.