Opened 8 months ago

Last modified 7 months ago

#6947 new defect

Can not build LibAdblockPlus

Reported by: jahmedir Assignee:
Priority: Unknown Milestone:
Module: Libadblockplus Keywords:
Cc: sergz, oleksandr Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

I am using Windows 10 x64 OS
I downloaded the master branch of libadblockplus from the link below:
https://github.com/adblockplus/libadblockplus

How to reproduce

  1. I have built V8. The path for the headers files and binary files of my V8 built are as follows, respectively:

C:\V-eight\v8\include
C:\V-eight\v8\out.gn\x64.release\obj

  1. I have set my path in environment variables such that if I do "where python" at the command for example C:\>where python then I get the following response:

C:\V-eight\depot_tools\python.bat

  1. I have set the environment variable "GYP_DEFINES" as below:

GYP_DEFINES=C:\V-eight\v8

  1. I ran the createsolution.bat from the path as below:

C:\V-eight\libadblockplus>createsolution.bat

Observed behaviour

  1. I am getting the following error:


File "C:\V-eight\depot_tools\win_tools-2_7_6_bin\python\bin\lib\subprocess.py", line 957, in _execute_child

startupinfo)

WindowsError: [Error 2] The system cannot find the file specified

Expected behaviour

Please ,any one, can help me to build libadblockplus

Attachments (7)

cs-bat.jpg (146.4 KB) - added by jahmedir 8 months ago.
cs-bat.2.jpg (146.4 KB) - added by jahmedir 8 months ago.
crs.gif (159.9 KB) - added by jahmedir 7 months ago.
image1.bmp (1.2 MB) - added by jahmedir 7 months ago.
VS-git-cloning.gif (188.7 KB) - added by jahmedir 7 months ago.
Git-Bash-clone.gif (44.7 KB) - added by jahmedir 7 months ago.
createsolution.gif (51.4 KB) - added by jahmedir 7 months ago.

Download all attachments as: .zip

Change History (30)

Changed 8 months ago by jahmedir

Changed 8 months ago by jahmedir

comment:1 Changed 8 months ago by oleksandr

  • Cc sergz oleksandr added

comment:2 Changed 8 months ago by sergz

GYP_DEFINES=C:\V-eight\v8

could you try
set "GYP_DEFINED=v8_dir=C:/V-eight/v8" (in your case v8_dir= is missing) and ensure that there is v8_monolith static library in C:\V-eight\v8\win-x64.Release, please adjust x64 and Release in accordance with your settings. This convention comes from v8.gypi, alternatively you can try to pass libv8_lib_dir, e.g.
set "GYP_DEFINED=v8_dir=C:/V-eight/v8 libv8_lib_dir=C:/V-eight/v8/out.gn/x64.release/obj"

comment:3 Changed 8 months ago by sergz

I also took a look at the screenshots, it seems that your are using mercurial but it's not installed or is not reachable by any path from PATH environment variable. One can also use git, just clone libadblockplus using git and the dependencies will be fetched using git too.
https://github.com/adblockplus/libadblockplus or https://gitlab.com/eyeo/adblockplus/libadblockplus/

comment:4 Changed 8 months ago by sergz

  • Component changed from Unknown to Libadblockplus

comment:5 Changed 7 months ago by jahmedir

I have tried
set "GYP_DEFINES=v8_dir=C:\V-eight\v8 libv8_lib_dir=C:\V-eight\v8\out.gn\x64.release\obj"

did not work

comment:6 Changed 7 months ago by jahmedir

I have tried
set "GYP_DEFINES=v8_dir=C:\V-eight\V8-build\v8 libv8_lib_dir=C:\V-eight\V8-build\v8\win-x64.Release"

did not work

in this case I created these folders C:\V-eight\V8-build\v8 and C:\V-eight\V8-build\v8\include and C:\V-eight\V8-build\v8\win-x64.Release

and I placed all headers files in the \include folder and I placed all .lib files in the win-x64.Release folder

In both cases , I had v8_monolith.lib

Changed 7 months ago by jahmedir

comment:7 Changed 7 months ago by jahmedir

please see crs.gif

Any idea please ~

comment:8 Changed 7 months ago by jahmedir

can we get any idea from this link
https://github.com/coursera-dl/edx-dl/issues/163

comment:9 follow-up: Changed 7 months ago by sergz

The first step should be #comment:3

comment:10 Changed 7 months ago by jahmedir

I am not using mercurial.

Last edited 7 months ago by jahmedir (previous) (diff)

comment:11 Changed 7 months ago by jahmedir

@sergz
some one have had similar issue a while ago.
https://issues.adblockplus.org/ticket/5270

but I don't know if he fixed it and if he did then how did he fixed it.

Last edited 7 months ago by jahmedir (previous) (diff)

Changed 7 months ago by jahmedir

comment:12 Changed 7 months ago by jahmedir

Last edited 7 months ago by jahmedir (previous) (diff)

comment:13 Changed 7 months ago by jahmedir

Do I need to do this :

set "GYP_DEFINES=v8_dir=C:/V-eight/v8 libv8_lib_dir=C:/V-eight/v8/out.gn/x64.release/obj libv8_libs=C:/V-eight/v8/out.gn/x64.release/obj libv8_include_dir=C:\V_8\v8\include"

comment:14 in reply to: ↑ 9 Changed 7 months ago by jahmedir

Replying to sergz:

The first step should be #comment:3

I got the clone from the link below:
https://github.com/adblockplus/libadblockplus.git
and then I ran createsolution.bat but the problem persisted so I investigated and then I found a potential fix as below:
In ensure_dependencies.py , inside the function "get_repo_type" at line 45 , I modified 'hg' to 'git' as below:


def get_repo_type(repo):

for name, repotype in repo_types.iteritems():

if repotype.istype(repo):

return name

return 'git'


Then I ran the createsolution.bat again and this time it looked like working and got the repositories . Please see the attached "image1"
However, createsolution.bat did not create the build\x64\shell folder, neither the solution is built
Please suggest ... ~

Last edited 7 months ago by jahmedir (previous) (diff)

comment:15 Changed 7 months ago by jahmedir

set "GYP_DEFINES=v8_dir=C:/V-eight/v8 libv8_lib_dir=C:/V-eight/v8/out.gn/x64.release/obj libv8_libs=C:/V-eight/v8/out.gn/x64.release/obj libv8_include_dir=C:\V_8\v8\include libv8_show_warnings=true"

comment:16 Changed 7 months ago by jahmedir

The libadblockplus solution is generated after using the above Set "GYP_DEFINES................."

now I am trying to build the libadblockplus solution and libadblockplus project inside the solution but getting an error as below:

1>c:\v_8\adblockplus-clone\src\consolejsobject.cpp(45): error C2660: 'v8::StackTrace::GetFrame': function does not take 1 arguments

comment:17 follow-ups: Changed 7 months ago by oleksandr

You should not have to hack around hg get_repo_type. Are you cloning into an empty directory using git (and only git) and still see errors? Can you post the exact commands you type to clonse and initialize the repository?

comment:18 Changed 7 months ago by jahmedir

I cloned through VS2017 IDE's github option that is in the Team Explored from the link below:
https://github.com/adblockplus/libadblockplus.git
and I cloned in the empty directory

Changed 7 months ago by jahmedir

comment:19 in reply to: ↑ 17 Changed 7 months ago by jahmedir

Please see the image "VS-git-cloning.gif" this is how I cloned the https://github.com/adblockplus/libadblockplus.git in my hard disk folder .
Then I ran createsolution.bat , see image1.bmp

If you think, this is not the proper way of cloning then please suggest how should I clone and initialize repository ~

Replying to oleksandr:

You should not have to hack around hg get_repo_type. Are you cloning into an empty directory using git (and only git) and still see errors? Can you post the exact commands you type to clonse and initialize the repository?

comment:20 follow-up: Changed 7 months ago by jahmedir

@ oleksandr

I fetched latest version of V8 and having compatibility issue in invoking a function from libadblockplus ...
1>c:\v_8\adblockplus-clone\src\consolejsobject.cpp(45): error C2660: 'v8::StackTrace::GetFrame': function does not take 1 arguments

Can you please let me know, what version of V8 is used by libadblockplus ~

comment:21 in reply to: ↑ 17 Changed 7 months ago by jahmedir

I got the clone of libadblockplus from the scratch , this time by using Git Bash and I used the command as follows:
$ git clone https://github.com/adblockplus/libadblockplus.git

See the image "Git-Bash-clone.gif"

This command gave me a folder libadblockplus and its contents and then I ran createsolution.bat (without any refactoring of "get_repo_type") . See the image createsolutin.gif

So, essentially ensure_dependencies.py is failing somewhere at the moment due to which the build\x64\ folder is not created neither the libadblockproject solution is generated.

Please suggest.

Replying to oleksandr:

You should not have to hack around hg get_repo_type. Are you cloning into an empty directory using git (and only git) and still see errors? Can you post the exact commands you type to clonse and initialize the repository?

Last edited 7 months ago by jahmedir (previous) (diff)

Changed 7 months ago by jahmedir

Changed 7 months ago by jahmedir

comment:22 in reply to: ↑ 20 Changed 7 months ago by jahmedir

I figured from https://hg.adblockplus.org/libadblockplus/file/default/README.md
that V8 version should be 6.7
So, the closest, I found is 6.7.1
Thanks though

Replying to jahmedir:

@ oleksandr

I fetched latest version of V8 and having compatibility issue in invoking a function from libadblockplus ...
1>c:\v_8\adblockplus-clone\src\consolejsobject.cpp(45): error C2660: 'v8::StackTrace::GetFrame': function does not take 1 arguments

Can you please let me know, what version of V8 is used by libadblockplus ~

comment:23 Changed 7 months ago by jahmedir

Project abpshell in the libadblockplus.sln solution has a reference of obj.lib in the
Configuration Properties --> Linker --> Input --> additional dependencies

v8/out.gn/x64.release/obj.lib

But there is no obj.lib and if I remove this reference then I get 123 errors when building abpshell project

Note: See TracTickets for help on using tickets.