Skip to content

build/scripts/Utils.lua:108: SSL peer certificate or SSH remote key was not OK Cert verify failed: BADCERT_NOT_TRUSTED #1849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Martinfx opened this issue Jun 3, 2024 · 11 comments

Comments

@Martinfx
Copy link

Martinfx commented Jun 3, 2024

Brief Description

Hi, i tried build cppsharpfor freebsd and I cannot download llvm.

./build.sh clone_llvm
/home/maxfx/Documents/CppSharp/build/premake/premake5
LLVM release: 6eb36aed86ea276695697093eb8136554c29286b
Downloading: https://github.com/llvm/llvm-project/archive/6eb36aed86ea276695697093eb8136554c29286b.tar.gz
Error: /usr/home/maxfx/Documents/CppSharp/build/scripts/Utils.lua:108: SSL peer certificate or SSH remote key was not OK
Cert verify failed: BADCERT_NOT_TRUSTED

OS: Windows / OS X / Linux (include version and/or distro)
uname -a
FreeBSD hades 13.3-RELEASE-p1 FreeBSD 13.3-RELEASE-p1 GENERIC amd64

Used headers
Used settings

Target: MSVC/GCC/Clang

Other settings

Stack trace or incompilable generated code
@tritao
Copy link
Collaborator

tritao commented Jun 3, 2024

We use Premake http.download to download, looks like it has a bug on FreeBSD.

Think it would be good if you can confirm the bug with just a simple Premake script and report upstream if this is the case.

And as workaround, you can change the download code here: https://github.com/mono/CppSharp/blob/main/build/scripts/Utils.lua#L99

To just call curl or wget instead with execute/os.execute function.

@Martinfx
Copy link
Author

Martinfx commented Jun 3, 2024

I changed function but on end is error 0 and nothing do and ./build llvm_build donwlaod again llvm

function download(url, file, try)
  print("Downloading: " .. url)
  local prev = 0
  local cmd = "wget " ..  url
  local res = execute(cmd)
--  local res, code = http.download(url, file, function(total, curr)
--    http.progress(total, prev, curr)
--    prev = curr
--  end)

  if res ~= "OK" then
    os.remove(file)

    if not try then
      error(res)
    end
  end

  return res, code
end



/home/maxfx/Documents/CppSharp/build/premake/premake5
LLVM/Clang directory does not exist, cloning...
LLVM release: 6eb36aed86ea276695697093eb8136554c29286b
Downloading: https://github.com/llvm/llvm-project/archive/6eb36aed86ea276695697093eb8136554c29286b.tar.gz
wget https://github.com/llvm/llvm-project/archive/6eb36aed86ea276695697093eb8136554c29286b.tar.gz
--2024-06-03 14:29:00--  https://github.com/llvm/llvm-project/archive/6eb36aed86ea276695697093eb8136554c29286b.tar.gz
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/llvm/llvm-project/tar.gz/6eb36aed86ea276695697093eb8136554c29286b [following]
--2024-06-03 14:29:01--  https://codeload.github.com/llvm/llvm-project/tar.gz/6eb36aed86ea276695697093eb8136554c29286b
Resolving codeload.github.com (codeload.github.com)... 140.82.121.10
Connecting to codeload.github.com (codeload.github.com)|140.82.121.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘6eb36aed86ea276695697093eb8136554c29286b.tar.gz.1’

6eb36aed86ea276695697093eb8136554c29286b.tar.gz.1               [                            <=>                                                                                                           ] 187.09M  3.67MB/s    in 50s     

2024-06-03 14:29:52 (3.76 MB/s) - ‘6eb36aed86ea276695697093eb8136554c29286b.tar.gz.1’ saved [196177099]

Error: 0

@tritao
Copy link
Collaborator

tritao commented Jun 3, 2024

Try returning "OK".

@Martinfx
Copy link
Author

Martinfx commented Jun 3, 2024

Try returning "OK".

./build.sh build_llvm
/home/maxfx/Documents/CppSharp/build/premake/premake5
LLVM/Clang directory does not exist, cloning...
LLVM release: 6eb36aed86ea276695697093eb8136554c29286b
Downloading: https://github.com/llvm/llvm-project/archive/6eb36aed86ea276695697093eb8136554c29286b.tar.gz
wget https://github.com/llvm/llvm-project/archive/6eb36aed86ea276695697093eb8136554c29286b.tar.gz
--2024-06-03 14:47:12-- https://github.com/llvm/llvm-project/archive/6eb36aed86ea276695697093eb8136554c29286b.tar.gz
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/llvm/llvm-project/tar.gz/6eb36aed86ea276695697093eb8136554c29286b [following]
--2024-06-03 14:47:12-- https://codeload.github.com/llvm/llvm-project/tar.gz/6eb36aed86ea276695697093eb8136554c29286b
Resolving codeload.github.com (codeload.github.com)... 140.82.121.10
Connecting to codeload.github.com (codeload.github.com)|140.82.121.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘6eb36aed86ea276695697093eb8136554c29286b.tar.gz’

6eb36aed86ea276695697093eb8136554c29286b.tar.gz [ <=> ] 187.09M 3.87MB/s in 50s

2024-06-03 14:48:03 (3.75 MB/s) - ‘6eb36aed86ea276695697093eb8136554c29286b.tar.gz’ saved [196177099]

Error: 0

@tritao
Copy link
Collaborator

tritao commented Jun 3, 2024

Check the code here: https://github.com/mono/CppSharp/blob/main/build/llvm/LLVM.lua#L198

Add some print if necessary. Looks like a simple issue to figure out whats going on.

@Martinfx
Copy link
Author

Martinfx commented Jun 3, 2024

Check the code here: https://github.com/mono/CppSharp/blob/main/build/llvm/LLVM.lua#L198

Add some print if necessary. Looks like a simple issue to figure out whats going on.

  print("base" .. base)
  print("archive" .. archive)
  msg, code = download(base .. archive, archive, true)
  print(msg)
  print(code)

 ./build.sh build_llvm
/home/maxfx/Documents/CppSharp/build/premake/premake5
LLVM/Clang directory does not exist, cloning...
LLVM release: 6eb36aed86ea276695697093eb8136554c29286b
Downloading: https://github.com/llvm/llvm-project/archive/6eb36aed86ea276695697093eb8136554c29286b.tar.gz
wget https://github.com/llvm/llvm-project/archive/6eb36aed86ea276695697093eb8136554c29286b.tar.gz
--2024-06-03 15:40:37--  https://github.com/llvm/llvm-project/archive/6eb36aed86ea276695697093eb8136554c29286b.tar.gz
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/llvm/llvm-project/tar.gz/6eb36aed86ea276695697093eb8136554c29286b [following]
--2024-06-03 15:40:37--  https://codeload.github.com/llvm/llvm-project/tar.gz/6eb36aed86ea276695697093eb8136554c29286b
Resolving codeload.github.com (codeload.github.com)... 140.82.121.9
Connecting to codeload.github.com (codeload.github.com)|140.82.121.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘6eb36aed86ea276695697093eb8136554c29286b.tar.gz’

6eb36aed86ea276695697093eb8136554c29286b.tar.gz                 [                                                                   <=>                                                                    ] 187.09M  1.49MB/s    in 1m 40s  

2024-06-03 15:42:18 (1.88 MB/s) - ‘6eb36aed86ea276695697093eb8136554c29286b.tar.gz’ saved [196177099]

Error: 0

@tritao
Copy link
Collaborator

tritao commented Jun 3, 2024

@Martinfx
Copy link
Author

Martinfx commented Jun 3, 2024

Check around here: https://github.com/mono/CppSharp/blob/main/build/llvm/LLVM.lua#L39

I dont know why cannot open archive. But in engrampa is ok.

 ./build.sh build_llvm
/home/maxfx/Documents/CppSharp/build/premake/premake5
LLVM/Clang directory does not exist, cloning...
LLVM release: 6eb36aed86ea276695697093eb8136554c29286b
llvm-6eb36aed86ea276695697093eb8136554c29286b.tar.gz
mkdir -p .
tar xvf llvm-6eb36aed86ea276695697093eb8136554c29286b.tar.gz -C .
Error: /usr/home/maxfx/Documents/CppSharp/build/scripts/Utils.lua:35: Error executing shell command, aborting...

@Martinfx
Copy link
Author

Martinfx commented Jun 3, 2024

Check around here: https://github.com/mono/CppSharp/blob/main/build/llvm/LLVM.lua#L39

I dont know why cannot open archive. But in engrampa is ok.

 ./build.sh build_llvm
/home/maxfx/Documents/CppSharp/build/premake/premake5
LLVM/Clang directory does not exist, cloning...
LLVM release: 6eb36aed86ea276695697093eb8136554c29286b
llvm-6eb36aed86ea276695697093eb8136554c29286b.tar.gz
mkdir -p .
tar xvf llvm-6eb36aed86ea276695697093eb8136554c29286b.tar.gz -C .
Error: /usr/home/maxfx/Documents/CppSharp/build/scripts/Utils.lua:35: Error executing shell command, aborting...

Why is there this error ^ ? Because tar xvf llvm-6eb36aed86ea276695697093eb8136554c29286b.tar.gz -C .
he cannot extract then I looked for to llvm folder and name si 6eb36aed86ea276695697093eb8136554c29286b.tar.gz
Why is open archive set to llvm-......?
This project is soo buggy. I have cloned project and he cannot detect llvm-project folder.

@tritao
Copy link
Collaborator

tritao commented Jun 3, 2024

Check around here: https://github.com/mono/CppSharp/blob/main/build/llvm/LLVM.lua#L39

I dont know why cannot open archive. But in engrampa is ok.

 ./build.sh build_llvm
/home/maxfx/Documents/CppSharp/build/premake/premake5
LLVM/Clang directory does not exist, cloning...
LLVM release: 6eb36aed86ea276695697093eb8136554c29286b
llvm-6eb36aed86ea276695697093eb8136554c29286b.tar.gz
mkdir -p .
tar xvf llvm-6eb36aed86ea276695697093eb8136554c29286b.tar.gz -C .
Error: /usr/home/maxfx/Documents/CppSharp/build/scripts/Utils.lua:35: Error executing shell command, aborting...

Why is there this error ^ ? Because tar xvf llvm-6eb36aed86ea276695697093eb8136554c29286b.tar.gz -C . he cannot extract then I looked for to llvm folder and name si 6eb36aed86ea276695697093eb8136554c29286b.tar.gz Why is open archive set to llvm-......? This project is soo buggy. I have cloned project and he cannot detect llvm-project folder.

First of all you are using an unsupported platform. And looks like at the same time you struggling to figure out what's going wrong by what appears to be a relatively simple issue. Maybe try using a supported platform to have a better experience.

@Martinfx
Copy link
Author

Martinfx commented Jun 4, 2024

Check around here: https://github.com/mono/CppSharp/blob/main/build/llvm/LLVM.lua#L39

I dont know why cannot open archive. But in engrampa is ok.

 ./build.sh build_llvm
/home/maxfx/Documents/CppSharp/build/premake/premake5
LLVM/Clang directory does not exist, cloning...
LLVM release: 6eb36aed86ea276695697093eb8136554c29286b
llvm-6eb36aed86ea276695697093eb8136554c29286b.tar.gz
mkdir -p .
tar xvf llvm-6eb36aed86ea276695697093eb8136554c29286b.tar.gz -C .
Error: /usr/home/maxfx/Documents/CppSharp/build/scripts/Utils.lua:35: Error executing shell command, aborting...

Why is there this error ^ ? Because tar xvf llvm-6eb36aed86ea276695697093eb8136554c29286b.tar.gz -C . he cannot extract then I looked for to llvm folder and name si 6eb36aed86ea276695697093eb8136554c29286b.tar.gz Why is open archive set to llvm-......? This project is soo buggy. I have cloned project and he cannot detect llvm-project folder.

First of all you are using an unsupported platform. And looks like at the same time you struggling to figure out what's going wrong by what appears to be a relatively simple issue. Maybe try using a supported platform to have a better experience.

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants