SAP / project-foxhound

A web browser with dynamic data-flow tracking enabled in the Javascript engine and DOM, based on Mozilla Firefox (https://github.com/mozilla/gecko-dev). It can be used to identify insecure data flows or data privacy leaks in client-side web applications.
GNU General Public License v3.0
82 stars 16 forks source link

Problem with building foxhound #79

Closed TheDarkTron closed 1 year ago

TheDarkTron commented 2 years ago

Hi there! I am a student from the TU Bs and would like to use foxhound in my masters thesis. I checked out the repo but was not able to build the project. My system:

Edition Windows 10 Education Version 22H2 Installed on ‎31.‎03.‎2021 OS build 19045.2251 Experience Windows Feature Experience Pack 120.2212.4180.0

What I did:

``` Dark Tron@RexTower1Win10 /d/Tron/repo/studium/semester14/project-foxhound $ ./mach build 0:43.41 Failed to parse ccache stats output: 'Local storage/Cache size (GB)' '0.00 / 5.00 ( 0.00%)' 0:44.55 Clobber not needed. Config object not found by mach. 0:44.76 D:/Tron/repo/studium/semester14/project-foxhound/obj-tf-release-64\_virtualenvs\build\Scripts\python.exe D:/Tron/repo/studium/semester14/project-foxhound\configure.py 0:46.09 Using Python 3.9.10 from D:\Tron\repo\studium\semester14\project-foxhound\obj-tf-release-64\_virtualenvs\build\Scripts\python.exe 0:46.44 Adding configure options from D:\Tron\repo\studium\semester14\project-foxhound\.mozconfig 0:46.44 --target=x86_64-pc-mingw32 0:46.44 --host=x86_64-pc-mingw32 0:46.44 --disable-updater 0:46.44 --disable-tests 0:46.44 --enable-cdp 0:46.44 MOZ_REQUIRE_SIGNING= 0:46.44 WIN32_REDIST_DIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\14.20.27508\x64\Microsoft.VC141.CRT 0:46.45 checking for vcs source checkout... git 0:48.51 checking for a shell... C:/mozilla-build/msys2/usr/bin/sh.exe 0:48.59 checking for host system type... x86_64-pc-mingw32 0:48.68 checking for target system type... x86_64-pc-mingw32 0:51.41 checking whether cross compiling... no 0:51.87 Traceback (most recent call last): 0:51.87 File "D:\Tron\repo\studium\semester14\project-foxhound\configure.py", line 349, in 0:51.87 sys.exit(main(sys.argv)) 0:51.87 File "D:\Tron\repo\studium\semester14\project-foxhound\configure.py", line 131, in main 0:51.87 sandbox.run(os.path.join(os.path.dirname(__file__), "moz.configure")) 0:51.87 File "D:\Tron\repo\studium\semester14\project-foxhound\python\mozbuild\mozbuild\configure\__init__.py", line 556, in run 0:51.88 raise InvalidOptionError(msg) 0:51.88 mozbuild.configure.options.InvalidOptionError: Unknown option: --enable-cdp Error running mach: ['build'] The error occurred in code that was called by the mach command. This is either a bug in the called code itself or in the way that mach is calling it. You can invoke |./mach busted| to check if this issue is already on file. If it isn't, please use |./mach busted file build| to report it. If |./mach busted| is misbehaving, you can also inspect the dependencies of bug 1543241. If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: Exception: Process executed with non-0 exit code 1: ['D:/Tron/repo/studium/semester14/project-foxhound/obj-tf-release-64\\_virtualenvs\\build\\Scripts\\python.exe', 'D:/Tron/repo/studium/semester14/project-foxhound\\configure.py'] File "D:\Tron\repo\studium\semester14\project-foxhound\python\mozbuild\mozbuild\build_commands.py", line 220, in build return driver.build( File "d:\tron\repo\studium\semester14\project-foxhound\python\mozbuild\mozbuild\controller\building.py", line 1296, in build config_rc = self.configure( File "d:\tron\repo\studium\semester14\project-foxhound\python\mozbuild\mozbuild\controller\building.py", line 1677, in configure status = self._run_command_in_objdir( File "d:\tron\repo\studium\semester14\project-foxhound\python\mozbuild\mozbuild\base.py", line 862, in _run_command_in_objdir return self.run_process(cwd=self.topobjdir, **args) File "D:\Tron\repo\studium\semester14\project-foxhound\python\mach\mach\mixin\process.py", line 180, in run_process raise Exception( Sentry event ID: 190dc828cc5d458198f5314bdc967cfc Sentry is attempting to send 0 pending error messages Waiting up to 2 seconds Press Ctrl-Break to quit ```
``` Dark Tron@RexTower1Win10 /d/Tron/repo/studium/semester14/project-foxhound $ ./mach build 1:20.65 Failed to parse ccache stats output: 'Local storage/Cache size (GB)' '0.00 / 5.00 ( 0.00%)' 1:20.82 Clobber not needed. Config object not found by mach. 1:20.84 D:/Tron/repo/studium/semester14/project-foxhound/obj-tf-release-64\_virtualenvs\build\Scripts\python.exe D:/Tron/repo/studium/semester14/project-foxhound\configure.py 1:21.13 Using Python 3.9.10 from D:\Tron\repo\studium\semester14\project-foxhound\obj-tf-release-64\_virtualenvs\build\Scripts\python.exe 1:21.47 Adding configure options from D:\Tron\repo\studium\semester14\project-foxhound\.mozconfig 1:21.47 --target=x86_64-pc-mingw32 1:21.48 --host=x86_64-pc-mingw32 1:21.48 --disable-updater 1:21.48 --disable-tests 1:21.48 WIN32_REDIST_DIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\14.20.27508\x64\Microsoft.VC141.CRT 1:21.48 MOZ_REQUIRE_SIGNING= 1:21.48 checking for vcs source checkout... git 1:21.57 checking for a shell... C:/mozilla-build/msys2/usr/bin/sh.exe 1:21.66 checking for host system type... x86_64-pc-mingw32 1:21.75 checking for target system type... x86_64-pc-mingw32 1:23.13 checking whether cross compiling... no 1:23.36 checking for Python 3... D:/Tron/repo/studium/semester14/project-foxhound/obj-tf-release-64/_virtualenvs/build/Scripts/python.exe (3.9.10) 1:23.38 checking for git... C:/PROGRA~1/Git/cmd/git.exe 1:23.41 checking for Git version... 2.38.1.windows.1 1:23.47 checking for sparse checkout... no 1:23.48 checking for wget... C:/mozilla-build/msys2/usr/bin/wget.exe 1:23.55 checking for ccache... not found 1:23.57 checking for the target C compiler... C:/PROGRA~1/LLVM/bin/clang-cl.exe 1:24.00 checking whether the target C compiler can be used... yes 1:24.00 checking the target C compiler version... 15.0.5 1:24.31 checking the target C compiler works... yes 1:24.32 checking for the target C++ compiler... C:/PROGRA~1/LLVM/bin/clang-cl.exe 1:24.42 checking whether the target C++ compiler can be used... yes 1:24.42 checking the target C++ compiler version... 15.0.5 1:24.57 checking the target C++ compiler works... yes 1:24.57 checking for the host C compiler... C:/PROGRA~1/LLVM/bin/clang-cl.exe 1:24.67 checking whether the host C compiler can be used... yes 1:24.67 checking the host C compiler version... 15.0.5 1:24.82 checking the host C compiler works... yes 1:24.83 checking for the host C++ compiler... C:/PROGRA~1/LLVM/bin/clang-cl.exe 1:24.93 checking whether the host C++ compiler can be used... yes 1:24.93 checking the host C++ compiler version... 15.0.5 1:25.08 checking the host C++ compiler works... yes 1:25.34 checking for 64-bit OS... yes 1:25.41 checking for Windows SDK... 0x0a00 in C:/PROGRA~2/WI3CF2~1/10/ 1:25.41 checking for Universal CRT SDK... 10.0.22000.0 in C:/PROGRA~2/WI3CF2~1/10/ 1:25.43 checking for linker... C:/PROGRA~1/LLVM/bin/lld-link.exe 1:25.45 checking for host_linker... C:/PROGRA~1/LLVM/bin/lld-link.exe 1:25.46 checking for the assembler... C:/PROGRA~1/MICROS~3/2022/COMMUN~1/VC/Tools/MSVC/1434~1.319/bin/HostX64/x64/ml64.exe 1:25.48 checking for rc... C:/PROGRA~1/LLVM/bin/llvm-rc.exe 1:25.49 checking for ar... C:/PROGRA~1/LLVM/bin/llvm-lib.exe 1:25.87 checking for stdint.h... yes 1:26.11 checking for inttypes.h... yes 1:26.36 checking for malloc.h... yes 1:26.42 checking for alloca.h... no 1:26.48 checking for sys/byteorder.h... no 1:26.53 checking for getopt.h... no 1:26.59 checking for unistd.h... no 1:26.64 checking for nl_types.h... no 1:26.87 checking for cpuid.h... yes 1:26.93 checking for fts.h... no 1:26.98 checking for sys/statvfs.h... no 1:27.04 checking for sys/statfs.h... no 1:27.09 checking for sys/vfs.h... no 1:27.14 checking for sys/mount.h... no 1:27.20 checking for sys/quota.h... no 1:27.26 checking for sys/queue.h... no 1:27.39 checking for sys/types.h... yes 1:27.44 checking for netinet/in.h... no 1:27.50 checking for byteswap.h... no 1:27.56 checking for memfd_create in sys/mman.h... no 1:27.62 checking for perf_event_open system call... no 1:27.66 checking for llvm_profdata... C:/PROGRA~1/LLVM/bin/LLVM-P~2.EXE 1:27.70 checking for rustc... C:/Users/DARKTR~1/CARGO~1/bin/rustc.exe 1:27.72 checking for cargo... C:/Users/DARKTR~1/CARGO~1/bin/cargo.exe 1:28.75 Actually using 'C:\Users\Dark Tron\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\rustc.exe' 1:28.95 Actually using 'C:\Users\Dark Tron\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\cargo.exe' 1:28.98 checking rustc version... 1.65.0 1:29.01 checking cargo version... 1.65.0 1:29.63 checking for rust host triplet... x86_64-pc-windows-msvc 1:29.72 checking for rust target triplet... x86_64-pc-windows-msvc 1:29.74 checking for rustdoc... C:/Users/DARKTR~1/CARGO~1/bin/rustdoc.exe 1:29.85 checking for cbindgen... C:/Users/DARKTR~1/CARGO~1/bin/cbindgen.exe 1:29.87 checking for rustfmt... C:/Users/DARKTR~1/CARGO~1/bin/rustfmt.exe 1:30.24 checking for clang for bindgen... C:/PROGRA~1/LLVM/bin/clang.exe 1:30.29 checking for libclang for bindgen... C:/PROGRA~1/LLVM/bin/libclang.dll 1:30.46 checking that libclang is new enough... yes 1:30.46 checking bindgen cflags... -x c++ -fno-sized-deallocation -fno-aligned-new -DTRACING=1 -DIMPL_LIBXUL -DMOZILLA_INTERNAL_API -DRUST_BINDGEN -DOS_WIN=1 -DWIN32=1 -D_CRT_USE_BUILTIN_OFFSETOF -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -std=gnu++17 1:30.58 checking for tm_zone and tm_gmtoff in struct tm... no 1:31.22 checking for _getc_nolock... yes 1:31.42 checking for localeconv... yes 1:33.00 checking for nodejs... D:\Tron\repo\studium\semester14\fh_build\node\node.EXE (12.22.1) 1:33.06 checking for tar... C:/mozilla-build/msys2/usr/bin/tar.exe 1:33.06 checking for unzip... C:/mozilla-build/bin/unzip.exe 1:33.09 checking for gn... not found 1:33.09 checking for the Mozilla API key... no 1:33.09 checking for the Google Location Service API key... no 1:33.09 checking for the Google Safebrowsing API key... no 1:33.09 checking for the Bing API key... no 1:33.09 checking for the Adjust SDK key... no 1:33.09 checking for the Leanplum SDK key... no 1:33.09 checking for the Pocket API key... no 1:33.10 checking for midl... C:/PROGRA~2/WI3CF2~1/10/bin/10.0.22000.0/x64/midl.exe 1:33.13 checking for llvm-dlltool... not found 1:33.13 DEBUG: llvm_dlltool: Looking for llvm-dlltool 1:33.13 ERROR: Cannot find llvm-dlltool Error running mach: ['build'] The error occurred in code that was called by the mach command. This is either a bug in the called code itself or in the way that mach is calling it. You can invoke |./mach busted| to check if this issue is already on file. If it isn't, please use |./mach busted file build| to report it. If |./mach busted| is misbehaving, you can also inspect the dependencies of bug 1543241. If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: Exception: Process executed with non-0 exit code 1: ['D:/Tron/repo/studium/semester14/project-foxhound/obj-tf-release-64\\_virtualenvs\\build\\Scripts\\python.exe', 'D:/Tron/repo/studium/semester14/project-foxhound\\configure.py'] File "D:\Tron\repo\studium\semester14\project-foxhound\python\mozbuild\mozbuild\build_commands.py", line 220, in build return driver.build( File "d:\tron\repo\studium\semester14\project-foxhound\python\mozbuild\mozbuild\controller\building.py", line 1296, in build config_rc = self.configure( File "d:\tron\repo\studium\semester14\project-foxhound\python\mozbuild\mozbuild\controller\building.py", line 1677, in configure status = self._run_command_in_objdir( File "d:\tron\repo\studium\semester14\project-foxhound\python\mozbuild\mozbuild\base.py", line 862, in _run_command_in_objdir return self.run_process(cwd=self.topobjdir, **args) File "D:\Tron\repo\studium\semester14\project-foxhound\python\mach\mach\mixin\process.py", line 180, in run_process raise Exception( Sentry event ID: d43921c7f9b74ec6a833f47dd60be087 Sentry is attempting to send 0 pending error messages Waiting up to 2 seconds Press Ctrl-Break to quit ```

I have llvm installed via choco. But it seams like the package does not include llvm_dlltool. I was unable to find instructions on how to install llvm_dlltool on the web.

Any help on the build setup is greatly appreciated!

tmbrbr commented 2 years ago

Hi @TheDarkTron, great to hear you are interested in Foxhound!

I have managed to build using Windows in the past by following the instructions here: https://firefox-source-docs.mozilla.org/setup/windows_build.html

In that case I didn't need chocolatey / rust, just built from the Mozilla build tools shell:

"When working with Firefox tooling, you’ll need to do so from within the MozillaBuild shell. You can start it by running C:\mozilla-build\start-shell.bat (you may want to make a shortcut to this file so it’s easier to start)."

Are you also doing this?

TheDarkTron commented 2 years ago

Hi and thanks for the reply! Yes I am using the mozilla-build\start-shell.bat but still getting the error. On 24. Nov 2022, at 17:33, Thomas Barber @.***> wrote: Hi @TheDarkTron, great to hear you are interested in Foxhound! I have managed to build using Windows in the past by following the instructions here: https://firefox-source-docs.mozilla.org/setup/windows_build.html In that case I didn't need chocolatey / rust, just built from the Mozilla build tools shell: "When working with Firefox tooling, you’ll need to do so from within the MozillaBuild shell. You can start it by running C:\mozilla-build\start-shell.bat (you may want to make a shortcut to this file so it’s easier to start)." Are you also doing this?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

TheDarkTron commented 1 year ago

I setup a VM and build the project under ubuntu. That worked