Building a previous version of Chromium browser - build

I'm trying to build a previous version of the Chromium browser that still had NPAPI support. I've gotten the code and I'm able to build the latest version of Chromium on my mac by using the stand build commands
gclient sync
ninja -C out/Debug chrome
everything works great I can run chrome after that. So I tried
git checkout tags/41.0.2272.96 -b npapi
ninja -C out/Debug chrome
but I end up getting
'../../chrome/app/chrome_exe_main_mac.c', needed by 'obj/chrome/app/helper_app.chrome_exe_main_mac.o', missing and no known rule to make it`
Is there a standard way to rebuild a previous version of chromium? everything I find is about getting the latest and building it but nothing about going back to a previous version

The instructions you want are at the top of this page.
What you are missing in your current steps is the gclient sync, which will pull the correct version of all the dependencies, and also regenerate the build files based on the current sources. (The error in your question is almost certainly due to the latter.)

Related

Mac OSX Codesigning issues

I am experiencing a problem with codesigning on Mac OSX (Catalina and older), that I cannot find any answer for. I do have a *.component file, that I am codesigning and notarizing with my Apple Developer ID, which is working perfect. As a post-install step on the target machine, I need to include some installation info within the component's Info.plist (so I am writing back to that *.plist file), which would then qualify as a manipulation of the component itself - ergo, the component's signing is going to be corrupt at this point (the host software will not load my software any more).
So I was trying to follow some advice and do a "blind" codesigning as additional post-install step on the user's machine with:
sudo codesign --force --deep -s - ABC.component
This was just working perfect for a few users, just when I found out, not everyone can make use of this (especially older Mac OSX). Sometimes this command will just not result in a properly signed component. One of the users then found out, he had to update Xcode CL Tools, to sign the file. He went:
xcode.select --install
I have tested this with several other users and it worked with them, too.
Here comes the issue:
As a result, I need to make sure, the user has installed the right version of Xcode Command Line Tools, but a lot of my clients do install on an offline device - so I would not be able to have xcode-select --install as a post-install step (because no internet connection).
Is it somehow possible to bundle the proper Xcode Command Line Tools into my installer and make use of it? Or do you see any other solution for the whole problem?

Missing binding Node Sass

When I use "yarn build", i got an error message:
Error: Missing binding /www/htdocs/node_modules/node-sass/vendor/linux-x64-57/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x
Found bindings for the following environments:
- Linux 64-bit with Node.js 10.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
I tried to use npm rebuild node-sass but it didn't work. What should I do?
This problem seems to be related to globally installed packages.
I have been fighting getting a CMS package - Enduro - to work and finally I found a solution.
Normally Enduro is installed in /usr/local/lib however it can also be installed in the project. When I run Enduro from the /usr/local/lib I get the "sass version error" like you. However when I run the local project version ./node-modules/.bin/enduro there is no version problems.
I got no clue how to fix the global installation since the bindings will not fix when I run the rebuild sass command.
But running Enduro from the project works fine for me for now.
I hope you can use some of this even if you are dealing with another product using Sass.

Dartium 1.21.0 build on Ubuntu 16.10

Try to build Dartium 1.21.0 on Ubuntu 16.10, following the instructions https://github.com/dart-lang/sdk/wiki/Building-Dartium
Replacing gclient config --deps-file tools/deps/dartium.deps/DEPS --name=src/dart https://github.com/dart-lang/sdk.git
with gclient config --deps-file tools/deps/dartium.deps/DEPS --name=src/dart https://github.com/dart-lang/sdk.git#1.21.0
With some minor tweaks, things works, until hit by same as this https://github.com/js-platform/node-webrtc/issues/221
Fixed in a later version of boringssl
https://boringssl.googlesource.com/boringssl/+/241364c6f4d44165ce2dc707b9ad141dcc880d1b
Chromium builds more or less of the box.
To continue, two options occur. To step the boringssl version and update the build files, alternativly find at matching os distro and version. What distro and version is Dartium build on? Goobuntu is based on Ubuntu, maybe 16.04 should be used? Or are there some other tweaks that will fix this?
ps. yes, I know at the moment the future of Dartium is uncertain (will use a build to look into the dart bindings towards blinks web idl).

Fixing MinGW Installation on Windows 8

While helping my friend spin up MinGW and a C++ environment on his Windows 8 computer, I ran the get-mingw script and waited as it ran through all the mirrors for required downloads. However, three downloads completely failed:
libltdl - installer script hung and then moved on after pressing "OK"
automake-1.11 - installer script tried finding 1.10, then 1.9, then 1.8, then 1.7 (all of which failed) until finally settling on 1.6
mktemp - script hung and moved on after pressing "OK"
In all three cases, the script gave me a nice error log upon completion, showing that a majority of packages had been downloaded and installed except for these three, which showed up as errors. However during the installation process I had simply gone to the MinGW sourceforge page and manually found and downloaded each .bin.tar.lzma file that was missing.
Now that I have them, is there a good accepted way to unpack and plug them into my friend's existing MinGW install? In case it's tough, I'm comfortable with unix and dos command line so I'll be able to move executables into the MinGW/bin folder if that's what's needed, I just want to check for the best way to 'fix' the install.
As a side note - even though the error log says these are required packages, adding MinGW/bin/ to the PATH still allows for use of gcc and g++, although not make (possibly because of automake failure?). Is this standard behavior?
Firstly, the package issue can be fixed by using the MinGW installer - keep the packages selected and go to "apply changes" and the script will probably try to redownload the missing packages. I think the original problem was probably just a shoddy wifi connection during repository connection.
However, I then ran into a problem where I tried to run gcc and it gave me a missing -lpthread error ... but this question was able to help me fix that, and gcc and g++ are working fine now (haven't opened and tested Eclipse yet though). Just in case of link decay, the issue I cited arises from the MinGW installer script not downloading the lpthread library upon installation. To fix that issue, quoted from link:
Just run and open MinGW Installation Manager, which should be pre-installed with MinGW, select "All Packages" on the left panel, and on the right panel, search for "mingw32-pthreads-w32" packages and install them.
I think the Installation Manager has libpthread and pthread available for install, and pthread libs were the ones that seemed to solve it for me.

Installing g++ to terminal from files on my mac

When I try to compile a c++ program in my Mac terminal, I get the following error:
-bash: g++: command not found
but I believe I have all the files I need on my Mac to run the compiler. I have the Developer folder, which contains Xcode in Applications, g++ in the usr/bin folder, and a bunch of other folders.
How can I use these files to install the g++ compiler. Thank you!
Assuming you have the latest Xcode, go to Xcode Preferences, Downloads, and click on the Install button next to Command Line Tools. This should install and put everything into your PATH automatically.
houbysoft's answer above is correct, but the OP needs a little more detail.
The basic idea is that you need the "Command Line Tools" environment installed. But the name for that environment, and how you install it, has changed multiple times over the years. So, houbysoft's steps work for 4.3.3, but not for 3.2.6.
In the 3.2 era, the tools were called "UNIX Development". And, rather than being downloaded and installed from within Xcode, they came as part of the Xcode mpkg and were installed as part of the initial Xcode install. In most versions, there was a checkbox named "UNIX Development", usually checked by default, but in some versions it was a separate step. Looking at the "Xcode 3.2.6 and IOS SDK 4.3" disk image currently available from Apple, it's a checkbox. Anyway, that's the only officially-supported way to get them, but lots of other ways work… Here are your options:
Throw away Xcode 3.2.6 (just trash the whole /Developer) and install 4.3.3, then follow houbysoft's steps to get the Command Line Tools. Unless there's a good reason you can't use 4.3, this is almost certainly the best answer.
Throw away Xcode 3.2.6 and reinstall it, and this time make sure the "UNIX Development" checkbox is on.
Just re-run the 3.2.6 installer, and make sure the "UNIX Development" checkbox is on.
Log into developer.apple.com and look through the downloads for a package named "UNIX Development Tools", "Developer Tools CLI", "CLI Developer Environment", "Command Line Tools", or similar that corresponds to 3.2.6. There is such a package for most, but not all, versions of Xcode, and can be used to set up a command-line build environment either with or without Xcode.
Look at the invisible packages on the Xcode disk image. I don't remember whether you need just DeveloperToolsCLI.pkg, or that plus a few others, but a bit of trial and error or googling should get you there.
If everything is installed correctly, it sounds like all you need to do is get your "PATH" environment variable modified.
This closely related SuperUser question should provide the answers you need, at least if you're running under Snow Leopard. Here's another question about setting environment variables for Lion.