Opened on 01/01/2015 at 07:30:55 AM
Closed on 02/21/2016 at 12:39:03 AM
#1743 closed defect (worksforme)
Is it possible to compile libadblockplus on/for Raspberry pi?
Reported by: | hemant | Assignee: | |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Libadblockplus | Keywords: | |
Cc: | sergz | Blocked By: | |
Blocking: | Platform: | Unknown | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
Is it possible to compile libadblockplus on Raspberry pi?
I tried compiling on rpi and cross compile from ubuntu but both didnt worked.
Attachments (0)
Change History (11)
comment:1 Changed on 01/01/2015 at 07:37:12 AM by hemant
comment:2 Changed on 01/01/2015 at 10:10:05 AM by mapx
- Component changed from Unknown to Libadblockplus
comment:3 Changed on 01/05/2015 at 11:45:21 AM by sergz
- Cc sergz added
In the listing above the linker cannot find the implementation of some functions from v8. So, I would recommend to check v8, may be it needs to be updated or merely some option in gyp file needs to be set to the correct value.
@hemant, Could you please provide details how you are doing it, so we can reproduce the exact state to identify the issue?
comment:4 Changed on 02/10/2015 at 08:25:21 PM by hemant
Hi,
Sorry for really late reply.
I am following checkout steps defined at
https://adblockplus.org/forum/viewtopic.php?t=17093
after checkout source I just run
"make ARCH=arm7"
in "libadblockplus" folder.
I also tried compiling libadblockplus on my rpi 2 box but got same error.
comment:5 Changed on 02/12/2015 at 11:40:04 AM by hemant
Above error was due to missing build for arm related files of v8.
I got it build after added arm7 in third_party/v8/tools/gyp/v8.gyp file.
"Line:550 --> ['v8_target_arch=="arm" or v8_target_arch=="arm7"', {"
also I have to disable snapshot in third_party/v8/build/features.gypi file.
Line:44 'v8_use_snapshot%': 'false',
comment:6 follow-up: ↓ 7 Changed on 02/12/2015 at 04:02:34 PM by hemant
getting following error while running abpshell.
~ $ ./abpshell
Error: Adblock Plus: Downloading URL https://easylist-downloads.adblockplus.org/easylist.txt failed (synchronize_connection_error)
Download address: https://easylist-downloads.adblockplus.org/easylist.txt?addonName=abpshell&addonVersion=1.0&application=standalone&applicationVersion=1.0&platform=libadblockplus&platformVersion=1.0&lastVersion=0
Channel status: 2147500037
Server response: 0 at compat.js:79
Traceback:
1: Components.utils.reportError() at compat.js:80
2: errorCallback() at downloader.js:140
3: /* anonymous */() at downloader.js:186
4: /* anonymous */() at compat.js:370
can you please advise to debug it?
comment:7 in reply to: ↑ 6 ; follow-up: ↓ 8 Changed on 02/13/2015 at 12:47:34 PM by sergz
Replying to hemant:
getting following error while running abpshell.
...
Server response: 0 at compat.js:79
...
can you please advise to debug it?
Congratulations with the compiling it!
Sounds like there is a trouble with the implementation of AdblockPlus::WebRequest. Could you check what implementation is used, may be you need to provide your component which is able to download data.
Check which GET is called in WebRequestThread::Run at WebRequestJsObject.cpp:61 (https://hg.adblockplus.org/libadblockplus/file/283cfc113717/src/WebRequestJsObject.cpp#l61)
comment:8 in reply to: ↑ 7 ; follow-up: ↓ 9 Changed on 02/13/2015 at 04:46:35 PM by hemant
Replying to sergz:
Replying to hemant:
getting following error while running abpshell.
...
Server response: 0 at compat.js:79
...
can you please advise to debug it?
Congratulations with the compiling it!
Sounds like there is a trouble with the implementation of AdblockPlus::WebRequest. Could you check what implementation is used, may be you need to provide your component which is able to download data.
Check which GET is called in WebRequestThread::Run at WebRequestJsObject.cpp:61 (https://hg.adblockplus.org/libadblockplus/file/283cfc113717/src/WebRequestJsObject.cpp#l61)
Thanks for pointers.
Following is the call stack for GET its calling dummy function which is by default setting error code.
AdblockPlus::DefaultWebRequest::GET (this=0xb6501cf8, url=..., requestHeaders=...) at ../src/DefaultWebRequestDummy.cpp:23 (gdb) where #0 AdblockPlus::DefaultWebRequest::GET (this=0xb6501cf8, url=..., requestHeaders=...) at ../src/DefaultWebRequestDummy.cpp:23 #1 0x0806ada9 in (anonymous namespace)::WebRequestThread::Run (this=0xb2b01610) at ../src/WebRequestJsObject.cpp:61 #2 0x080671c6 in (anonymous namespace)::CallRun (thread=0xb2b01610) at ../src/Thread.cpp:30 #3 0xb7e6cd78 in start_thread (arg=0xb2affb40) at pthread_create.c:311 #4 0xb7da401e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131 (gdb)
From DefaultWebRequestDummy.cpp
20 AdblockPlus::ServerResponse AdblockPlus::DefaultWebRequest::GET( 21 const std::string& url, const HeaderList& requestHeaders) const 22 { 23 AdblockPlus::ServerResponse result; 24 result.status = NS_ERROR_FAILURE; 25 result.responseStatus = 0; 26 return result; 27 }
Is there any sample code for WebRequest which I can use to write GET function for linux?
comment:9 in reply to: ↑ 8 ; follow-up: ↓ 10 Changed on 02/13/2015 at 04:50:14 PM by sergz
Replying to hemant:
...
Is there any sample code for WebRequest which I can use to write GET function for linux?
Yes, even more, if you can use libcurl you can try to use libadblockplus\src\DefaultWebRequestCurl.cpp instead of dummy.
comment:10 in reply to: ↑ 9 Changed on 02/13/2015 at 05:29:33 PM by hemant
Replying to sergz:
Replying to hemant:
...
Is there any sample code for WebRequest which I can use to write GET function for linux?
Yes, even more, if you can use libcurl you can try to use libadblockplus\src\DefaultWebRequestCurl.cpp instead of dummy.
Thanks alot its not showing any error now and patterns.ini is having patterns :).
Thanks again for your help :).
comment:11 Changed on 02/21/2016 at 12:39:03 AM by sergz
- Resolution set to worksforme
- Status changed from new to closed
- Tester set to Unknown
- Verified working unset
I have got following error while building on ubuntu
disassembler.cc:(.text._ZN2v88internalL8DecodeItEPNS0_7IsolateEP8_IO_FILERKNS0_15V8NameConverterEPhS8_+0x109): undefined reference to `disasm::Disassembler::Disassembler(disasm::NameConverter const&)'
disassembler.cc:(.text._ZN2v88internalL8DecodeItEPNS0_7IsolateEP8_IO_FILERKNS0_15V8NameConverterEPhS8_+0x1ff): undefined reference to `disasm::Disassembler::ConstantPoolSizeAt(unsigned char*)'
disassembler.cc:(.text._ZN2v88internalL8DecodeItEPNS0_7IsolateEP8_IO_FILERKNS0_15V8NameConverterEPhS8_+0x3a7): undefined reference to `disasm::Disassembler::InstructionDecode(v8::internal::Vector<char>, unsigned char*)'
disassembler.cc:(.text._ZN2v88internalL8DecodeItEPNS0_7IsolateEP8_IO_FILERKNS0_15V8NameConverterEPhS8_+0xff7): undefined reference to `disasm::Disassembler::~Disassembler()'
disassembler.cc:(.text._ZN2v88internalL8DecodeItEPNS0_7IsolateEP8_IO_FILERKNS0_15V8NameConverterEPhS8_+0x10fe): undefined reference to `disasm::Disassembler::~Disassembler()'
out/Debug/obj.target/third_party/v8/tools/gyp/../../../../v8_base.arm6/third_party/v8/src/disassembler.o:(.rodata._ZTVN2v88internal15V8NameConverterE[_ZTVN2v88internal15V8NameConverterE]+0x20): undefined reference to `disasm::NameConverter::NameOfCPURegister(int) const'
out/Debug/obj.target/third_party/v8/tools/gyp/../../../../v8_base.arm6/third_party/v8/src/disassembler.o:(.rodata._ZTVN2v88internal15V8NameConverterE[_ZTVN2v88internal15V8NameConverterE]+0x28): undefined reference to `disasm::NameConverter::NameOfByteCPURegister(int) const'
out/Debug/obj.target/third_party/v8/tools/gyp/../../../../v8_base.arm6/third_party/v8/src/disassembler.o:(.rodata._ZTVN2v88internal15V8NameConverterE[_ZTVN2v88internal15V8NameConverterE]+0x30): undefined reference to `disasm::NameConverter::NameOfXMMRegister(int) const'
out/Debug/obj.target/third_party/v8/tools/gyp/../../../../v8_base.arm6/third_party/v8/src/disassembler.o:(.rodata._ZTVN2v88internal15V8NameConverterE[_ZTVN2v88internal15V8NameConverterE]+0x40): undefined reference to `disasm::NameConverter::NameOfConstant(unsigned char*) const'
collect2: error: ld returned 1 exit status
third_party/v8/tools/gyp/mksnapshot.arm6.target.mk:114: recipe for target 'out/Debug/mksnapshot.arm6' failed
make[1]: * [out/Debug/mksnapshot.arm6] Error 1
make[1]: Leaving directory '/home/hemant/libadblockplus/build'