Skip to content

0.10.2 fails to build on armhf and armel #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cinemast opened this issue Jun 10, 2015 · 10 comments
Closed

0.10.2 fails to build on armhf and armel #290

cinemast opened this issue Jun 10, 2015 · 10 comments
Assignees
Labels

Comments

@cinemast
Copy link
Contributor

Hi!

On armhf and armel archs, the debian build is failing due to missing Json::Value::null. Can you help me fix this?

See here:
https://buildd.debian.org/status/fetch.php?pkg=libjsoncpp&arch=armel&ver=0.10.2-2&stamp=1433871006
https://buildd.debian.org/status/fetch.php?pkg=libjsoncpp&arch=armhf&ver=0.10.2-2&stamp=1433871004

Thank you and Greetings.

@cdunn2001
Copy link
Contributor

Ok. Which commit? We tried something recently which might help, and I don't think we merged it. Can you cherry-pick from this PR?

I was reluctant to merge it because I was afraid of breaking Debian. But maybe this will actually fix Debian.

@cdunn2001
Copy link
Contributor

I'll try to put that on a branch...

@cdunn2001
Copy link
Contributor

Ok. Try the private-null branch. Several commits, but the diff is tiny.

@cinemast
Copy link
Contributor Author

On a ARM board I then get the following error for the private-null branch:

In file included from /home/ubuntu/jsoncpp/include/json/assertions.h:13:0,
                 from /home/ubuntu/jsoncpp/src/lib_json/json_value.cpp:7:
/home/ubuntu/jsoncpp/include/json/config.h:100:14: warning: ISO C++ 1998 does not support ‘long long’ [-Wlong-long]
 typedef long long int Int64;
              ^
/home/ubuntu/jsoncpp/include/json/config.h:101:23: warning: ISO C++ 1998 does not support ‘long long’ [-Wlong-long]
 typedef unsigned long long int UInt64;
                       ^
/home/ubuntu/jsoncpp/src/lib_json/json_value.cpp:27:21: error: ‘const Json::Value& Json::Value::null’ is not a static member of ‘class Json::Value’
 const Value& Value::null = Value::kNull;
                     ^
/home/ubuntu/jsoncpp/src/lib_json/json_value.cpp: In copy constructor ‘Json::Value::CZString::CZString(const Json::Value::CZString&)’:
/home/ubuntu/jsoncpp/src/lib_json/json_value.cpp:244:35: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
                  : other.storage_.policy_);
                                   ^
make[2]: *** [src/lib_json/CMakeFiles/jsoncpp_lib_static.dir/json_value.cpp.o] Error 1
make[1]: *** [src/lib_json/CMakeFiles/jsoncpp_lib_static.dir/all] Error 2
make: *** [all] Error 2

@hchunhui
Copy link

In include/json/value.h:164

#if !defined(__ARMEL__)
  /// \deprecated This exists for binary compatibility only. Use nullRef.
  static const Value null;
#endif

So 0.10.2 on armel, Value::null doesn't exist.

On the other hand, the test program uses Value::null unconditionally:
In src/test_lib_json/main.cpp:285

  JSONTEST_ASSERT_EQUAL(Json::Value::null, null_);

That is why the build is failed.

@cdunn2001
Copy link
Contributor

Tonight, I'll remove the use of 'null' from the tests for ARMEL.

@cdunn2001 cdunn2001 added the bug label Jun 10, 2015
@cdunn2001 cdunn2001 self-assigned this Jun 10, 2015
cdunn2001 added a commit to cdunn2001/jsoncpp that referenced this issue Jun 11, 2015
cdunn2001 added a commit that referenced this issue Jun 11, 2015
@cdunn2001
Copy link
Contributor

@cinemast, It should be fixed now.

@hchunhui, Thanks!

@cinemast
Copy link
Contributor Author

Looks good. Thank you for your help.

@cdunn2001
Copy link
Contributor

Good. I'll add a signature.

cdunn2001 added a commit to cdunn2001/jsoncpp that referenced this issue Jun 19, 2015
(cherry picked from commit 2760c79)
@cinemast cinemast reopened this Aug 4, 2015
@cinemast
Copy link
Contributor Author

cinemast commented Aug 4, 2015

Sorry false alarm.

@cinemast cinemast closed this as completed Aug 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants