rovo89 / android_art

Android ART with modifications for the Xposed framework.
Other
375 stars 211 forks source link

use of undeclared identifier 'be32toh' #42

Closed ajmtrz closed 8 years ago

ajmtrz commented 8 years ago
art/runtime/lgalmond.cc:99:22: error: use of undeclared identifier 'be32toh'
  if (mprotect(data, be32toh(almond.rodata_length), PROT_READ | PROT_WRITE) != 0) {
                     ^
art/runtime/lgalmond.cc:105:21: error: use of undeclared identifier 'be32toh'
  protected_data += be32toh(almond.protected_offset) - be32toh(almond.rodata_offset);
                    ^
art/runtime/lgalmond.cc:105:56: error: use of undeclared identifier 'be32toh'
  protected_data += be32toh(almond.protected_offset) - be32toh(almond.rodata_offset);
                                                       ^
art/runtime/lgalmond.cc:107:31: error: use of undeclared identifier 'be32toh'
  if (DecOat_(protected_data, be32toh(almond.protected_length), almond.bind_id, almond.hashed_cid) == 0) {
                              ^
art/runtime/lgalmond.cc:109:20: error: use of undeclared identifier 'be32toh'
    mprotect(data, be32toh(almond.rodata_length), PROT_READ);
                   ^
5 errors generated.
rovo89 commented 8 years ago

How are you compiling it? I don't get such errors when compiling with the build script from the XposedTools repository.

ajmtrz commented 8 years ago

uber 5.3

rovo89 commented 8 years ago

That doesn't answer my question. ART can be compiled just fine with a standard make environment. No idea what "uber" is - Google just tells me it's a taxi alternative or a client-side JS/CSS compiler, but that probably has nothing to do with compiling ART. So please describe in detail what kind of non-standard environment you have, which commands you're calling etc.

ajmtrz commented 8 years ago

Thanks for your response. I build xposed with xposedtools, with art and xposed placed into my aosp source tree. Now, I build aosp with uber toolchain 5.3 without problem, so, i want build xposed binaries and modules with uber 5.3 too, but from commit 2ea159fcc69fff775a795257a8cb9938aaa74dfc i can't. Perhaps it is a failure of the uber toolchain. I will inform you.

ajmtrz commented 8 years ago

Ok. My problem is my Debian System and his GCC version. I close issue. Thanks and Sorry.

rovo89 commented 8 years ago

OK. Possibly, adding #include <endian.h> in lgalmond.cc might help, but I'm not sure whether that works and whether it has any impact on other setups.

ajmtrz commented 8 years ago

Ok. Thanks very much.

ajmtrz commented 8 years ago

Adding #include <endian.h> in lgalmond.cc build successfully. Thanks very much.

rovo89 commented 8 years ago

OK, I'll add that in my code.