midori-browser / core

Midori Web Browser - a lightweight, fast and free web browser using WebKit and GTK+
https://www.midori-browser.org/
GNU Lesser General Public License v2.1
400 stars 67 forks source link

Different versions in _build and /usr/bin after installing #398

Closed AEimre closed 4 years ago

AEimre commented 4 years ago

Hello, this is a strange issue I'm having. I cloned the repository and built from source according to the instructions in the readme. When I run midori from the _build folder, it will be version 9.

However after doing 'sudo make install', the installed version will be version 7. And it's not just the number - there is a bug in v7 which confirms that /usr/bin/midori is actually version 7. It seems like the installed binary is taken from somewhere other than _build.

Here's some terminal output.

pi@raspberrypi:~ $ uname -a Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

Before installing: pi@raspberrypi:~/midori/core/_build $ which midori pi@raspberrypi:~/midori/core/_build $ ls /usr/bin/ | grep midori (no output for either)

pi@raspberrypi:~/midori/core/_build $ sudo make install [...] -- Installing: /usr/bin/midori [...]

pi@raspberrypi:~/midori/core/_build $ which midori /usr/bin/midori

The binary in _build: pi@raspberrypi:~/midori/core/_build $ ./midori --version midori v9.0-7-gd8546ca6 Copyright 2007-2018 Christian Dywan Please report comments, suggestions and bugs to: https://github.com/midori-browser/core/issues Check for new versions at: https://www.midori-browser.org

The binary now in /usr/bin/: pi@raspberrypi:~/midori/core/_build $ midori --version midori 7.0 Copyright 2007-2018 Christian Dywan Please report comments, suggestions and bugs to: https://github.com/midori-browser/core/issues Check for new versions at: https://www.midori-browser.org

If I then copy the binary from _build to /usr/bin, the version will be correct. pi@raspberrypi:~/midori/core/_build $ sudo mv /usr/bin/midori ~/midori.backup pi@raspberrypi:~/midori/core/_build $ sudo cp midori /usr/bin/ pi@raspberrypi:~/midori/core/_build $ midori --version midori v9.0-7-gd8546ca6 Copyright 2007-2018 Christian Dywan Please report comments, suggestions and bugs to: https://github.com/midori-browser/core/issues Check for new versions at: https://www.midori-browser.org

Is this an issue with my device? I don't see where the wrong binary could come from, and I made sure to delete any file and folder named midori before installing.

Update: on a different device (same model), the issue is not present. So this must be a problem with the specific device, but I still don't see where the wrong version binary could have come from.

kalikiana commented 4 years ago

It looks to me like you're copying the midori binary only and no other files. Which means in particular that the libcore.so is a different one. There's an implementation detail here that you normally don't need to care about, which is that libcore.so contains most of the logic, UI definitions and CSS used by the GUI.

You should really use the install target instead of copying individual files.

AEimre commented 4 years ago

I did use the install target. Perhaps I wasn't clear in describing my process. I cut off most of the output of sudo make install in my description and only left the row that described copying the binary to emphasize that the binary was indeed copied.

To sum up:

  1. No midori is installed (/usr/bin/midori does not exist).
  2. sudo make install from _build after compiling.
  3. /usr/bin/midori is now version 7.
  4. Manually copy the binary from _build to /usr/bin (should not be necessary).
  5. /usr/bin/midori is now version 9.