Understanding a Bugfix for building Valgrind from source - valgrind

I am trying to build Valgrind from source and ran into the same problem other's have before me. The proposed solutions where all quite hacky, though, which is not the way I like to do things.
I also found something in the Ubuntu bugtracker for the Valgrind package:
Proposed fix:
valgrind (1:3.7.0-0ubuntu2) precise; urgency=low
* Allow glibc 2.15 in the configure checks. (LP: #934127)
- Add 0009-glibc-215.patch, cherry-picked from upstream.
- Add 0010-automake-1.11.2.patch by Gregorio Guidi.
- Use dh-autoreconf instead of autotools-dev.
-- Felix Geyer <email address hidden> Fri, 17 Feb 2012 12:14:44 +0100
This was accepted as fix for the bug, so I figured it might be the real solution.
Yet I can't apply it just like that.
what means cherry-picked from upstream?
Neither searching in google nor in the downloaded source package found these patch files.
Also the last point Use dh-autoreconf instead of autotools-dev is not clear to me.
Can someone translate the solution into a more applicable form?

The easiest way would be to see if you can install the corresponding version through your package manager. If you really need to build it yourself, you will find the mentioned patches e.g. in the [..].debian.tar.gz archive.
If you look into the Ubuntu tracker, you will find:
diff -Nru valgrind-3.7.0/debian/patches/0009-glibc-215.patch valgrind-3.7.0/debian/patches/0009-glibc-215.patch
--- valgrind-3.7.0/debian/patches/0009-glibc-215.patch 1970-01-01 01:00:00.000000000 +0100
+++ valgrind-3.7.0/debian/patches/0009-glibc-215.patch 2012-02-17 12:14:29.000000000 +0100
## -0,0 +1,30 ##
+Description: add support for glibc 2.15
+Origin: upstream, http://sourceforge.net/mailarchive/forum.php?thread_name=20111229082456.D5FE6108870%40jail0086.vps.exonetric.net&forum_name=valgrind-developers
+
+Modified: trunk/configure.in
...
The SourceForge URL above tells you that this patch was committed in r.12323 to the Valgrind repo.
(The last remark about the autotools is specific to the Debian package building process, and has most likely nothing to do with your problem.)

Related

CMake hunter error: `Unexpected MSVC_VERSION`

First of all, thank you for taking your time to help!
System: Windows 10 x64
cmake version: 3.24.1
Visual Studio 2022 v17.3.3
Console with admin privileges: Developer Command Prompt for VS 2022
Perl (Strawberry Perl): perl 5, version 32, subversion 1 (v5.32.1) built for MSWin32-x64-multi-thread
I am trying to compile kawpowminer from https://github.com/RavenCommunity/kawpowminer.
I already found some other solutions to similar errors but they haven't helped me.
Looked into those files (every single one printed out in the error) and found the lines with "hunter_add_package" as the cause of those errors.
I also changed 2019 to 2022 and 15 to 17 in those config files and edited the paths if needed.
I cloned at C:\Users\MEuser\kp the described git-project from "https://github.com/RavenCommunity/kawpowminer".
This is my script, the last line is causing the error. No errors are printed out before.
mkdir kp
cd kp
git clone https://github.com/RavenCommunity/kawpowminer
cd kawpowminer
git submodule update --init --recursive
cd build
cmake -G "Visual Studio 16 2019" -A X64 -H. -Bbuild -DETHASHCL=ON -DETHASHCUDA=ON -DAPICORE=ON ..
cd build
cmake --build . --config Release
Console: Developer Command Prompt for VS 2022
CMake Warning: Ignoring extra path from command line:
"C:/Users/Meuser/k2/kawpowminer/build"
-- [cable ] Cable 0.2.14 initialized
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- [cable ] Configurations: Release;RelWithDebInfo
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] Calculating Config-SHA1
-- [hunter] HUNTER_ROOT: C:/.hunter
-- [hunter] [ Hunter-ID: e14bc15 | Toolchain-ID: b0b5bc7 | Config-ID: 196746b ]
[hunter ** INTERNAL **] Unexpected MSVC_VERSION: '1933' [hunter **
INTERNAL **] [Directory:C:/Users/MEuser/k2/kawpowminer]
--lol------------------------- ERROR ------------------------lol--
https://docs.hunter.sh/en/latest/reference/errors/error.internal.html
------------------------------------------------------------------
CMake Error at
C:/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_error_page.cmake:12
(message): Call Stack (most recent call first):
C:/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_internal_error.cmake:13 (hunter_error_page)
C:/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_setup_msvc.cmake:73
(hunter_internal_error)
C:/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_finalize.cmake:117
(hunter_setup_msvc)
C:/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_add_package.cmake:23
(hunter_finalize) CMakeLists.txt:56 (hunter_add_package)
-- Configuring incomplete, errors occurred!
I did found similar errors in the internet and on stack but nothing really helped me.
I also searched through the files and the config (CMakeLists.txt) and researched some lines, but I really didnt found anything interesting, similar or working.
(it's 5am in my country, please don't assume I didn't researched a lot or anything, I am just lost)
I also tried different includes for the HunterGate like
include("cmake/HunterGate.make")
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.23.33.tar.gz"
SHA1 "abcf4b9b77b5a0160abc1da1cdda35f64b14196a"
)
But at this point I have to admit, I don't know what I am actually doing...
Investigating your error message,
[hunter ** INTERNAL **] Unexpected MSVC_VERSION: '1933' [hunter **
INTERNAL **] [Directory:C:/Users/MEuser/k2/kawpowminer]
I'm pretty sure this is fixed by this hunter PR ("Add support for Visual Studio 17 2022" #484), which added the following to :/cmake/modules/hunter_setup_msvc.cmake:
# ...
string(REGEX MATCH "^193[0-9]$" _vs_17_2022 "${MSVC_VERSION}")
# ...
elseif(_vs_17_2022)
set(HUNTER_MSVC_VERSION "17")
set(HUNTER_MSVC_YEAR "2022")
# ...
The solution is to update your hunter version to get this fix.
I think the Hunter first step docs should be all the information you need. Just change the HunterGate URL to use v0.23.317.
You get a gold star from me for providing so many details in your question (I think you were just missing what hunter version you're using).
If I could add a bit more to my answer, I'd say that reading long error messages to find the important parts and googling key phrases is useful (a skill? / a helpful trick?). If this is truly the cause of your issue, with luck, it's possible to find the answer yourself in less than 5 minutes. I just read your error message, and googled:
hunter "Unexpected MSVC_VERSION"
(the quotes means to look for an exact match)
, which led me to hunter_setup_msvc.cmake in the old hunter repo, and then I just went to the new repo, went to the file, and (by luck) the GitHub banner for most recent commit said "tnixeu add msvc17_2022 to huter_setup_msvc.cmake (#484)".
* Bonus link to wikipedia on MSVC versions.

"invalid version 0 on git_proxy_options" from libgit2: cause? fix? walk-around?

I'm getting this error "invalid version 0 on git_proxy_options" from libgit2. This did not happen until very recently (I have recompiled my code so it may be a version issue). I'm not using a proxy. Does anyone know anything about this? What causes this message? Is there anything I can do to stop the failure? Either a fix or or a work-around will do.
Specifically, I am using the Rust crate git2 version 0.13.23. I am doing a fetch that triggers the error. This is on Fedora 34 on x86_64. I have searched on this but there does not seem to be any matches that help.
git2 = {version="0.13.22", features = ["vendored-libgit2"]}
in Cargo.toml fixed the issue.
Interesting...
I had upgraded libgit2 to 1.3.0 from 1.1.1. That broke my existing cargo install, so I unpacked the previous libgit2.so.1.1 with a symlink to libgit2.so.1. That's when this error condition showed up. After thinking a bit I decided to symlink libgit2.so.1.3 to libgit2.so.1.1 and it built my new cargo version which linked to the new libgit2.so.1.3. Then I deleted my libgit2.so.1.1 stuff. Kinda weird, and usually you expect things not to work when it has been linked to a previous .so version.

Why am I unable to use glog due to incorrect hash?

Related to my question on ReactNative init setup process being awful, I am unable to download glog due to an incorrect hash. Does anyone know what is going on here? How can I fix this so that I can use react-native properly? I have tried clearing my entire .rncache and it did nothing.
It does look like glog-0.3.5 is the most recent version... so why am I having a nightmare of a time using this? Why is the hash incorrect? Does ReactNative install something with a different hash than it is supposed to?
Incorrect hash:
61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc
?/Users/me/.rncache/glog-0.3.5.tar.gz
Retrying...
Failed to successfully download 'glog-0.3.5.tar.gz'. Debug info:
-rw-r--r-- 1 root staff 532275 Feb 15 18:24 /Users/me/.rncache/glog-0.3.5.tar.gz
61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc
/Users/me/.rncache/glog-0.3.5.tar.gz
Command PhaseScriptExecution failed with a nonzero exit code
My error was located a bit above yours in the console.
Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
I fixed this by symlinking to the version I had.
ln -s /usr/local/opt/readline/lib/libreadline.7.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
If the lib does not exists and you are using Mac you can use a custom brash with brew.
https://itnext.io/upgrading-bash-on-macos-7138bd1066ba
Actually #FOLOG's suggestion, while working, was a bit of a ghetto fix. I encountered this issue and went to dig a little further and found the culprit to be gawk.
The clue is here: Referenced from: /usr/local/bin/awk
Assuming you are on Mac, just run brew upgrade gawk to fix the problem.

Couchapp - default template not found when running `couchapp generate ...` on Windows

After thorough browsing I decided to post here as I could not find a working prompt on the problem.
I installed CouchDB and Couchapp (in version 1.0.0, freshest one on Github) on Win8 machine and when I try to run couchapp generate app contacts I get:
2014-11-21 22:01:00 [ERROR] couchapp error: Can't create a CouchApp in C:\Users\
Michal\Desktop\contacts: default template not found.
I have not so far dug deeper into the Couchapp code to see if I can fix it. Fixes applied by Couchapp creator, Benoit, don't work for me.
All advice/constructive criticism much appreciated.
OK, I got it working - all that was needed was to include an environment variable for couchapp.exe. So, if you are installing a standalone version of Couchapp from the downloads section ( https://github.com/downloads/couchapp/couchapp/couchapp-1.0.0-win.zip, e.g. ) you NEED TO MAKE SURE that you first of all execute the installer and then point you environment variables Path to it, that's all. Hope it helps.

The ordinal 968 issue

I am using openssl in a project. It works fine on one machine. However, on an xp pro machine I get:
The ordinal 968 could not be located in hte dynamic link library LIBEAY32.dll
Does anyone know how to fix this issue, is it a dependency issue on some other dll?
A Google search leads to a forum thread where someone solved this problem. This might help you to do so, too.
This Page:
http://www.slproweb.com/products/Win32OpenSSL.html
Pointed me to this:
Install the c++ 2008 redistributable and that solved the problem.
I had the similar problem, just with a different number (3906).
When I searched for all libeay32.dll files in my %PATH%, I noticed that there are quite a few installed on my system. The first in the path happened to be an older version (OpenSSL 0.9.8h 28 May 2008), installed with Gnuwin32. I renamed this file to libeay32.dll.xxx, effectively disabling this dll, and this fixed the issue for me! The next libeay32.dll on my path is a much more recent version (OpenSSL 1.0.1h 5 Jun 2014).
I wrote this little python script to find the libeay32.dll files on my system, and to determine the OpenSSL version:
import os, re
for dir in os.getenv("PATH").split(";"):
filename = os.path.join(dir, "libeay32.dll")
if os.path.exists(filename):
print("== " + dir)
with open(filename, "rb") as fh:
for line in fh:
m = re.search("OpenSSL [0-9][0-9. a-zA-Z]+", line)
if m:
print(m.group(0))
break