Code Monkey home page Code Monkey logo

Comments (26)

eidheim avatar eidheim commented on August 23, 2024

Have no clue whatsoever why it says Python Exception...

Edit: this is because gdb uses python I think

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

Seems like libclang on MSYS2 is compiled without threads: https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-clang/PKGBUILD. This is most likely the issue.

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

Temporary fix is to add a mutex on the clang operations in jucipp if MSYS2, untill libclang or MSYS fixes the issue. I think its fixed in the lates libclang svn. I'll fix it

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

Have confirmed that setting -DLLVM_ENABLE_THREADS=1 at https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-clang/PKGBUILD#L194 fixes this issue.

I will make a pull request on this, but have to fix a sha256sum as well. Tomorrow or so.

from jucipp.

zalox avatar zalox commented on August 23, 2024

That's great news! clang calls have been terrible on windows lately.

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

It might also be that we currently combine posix and windows threads on windows. Will try to only use windows threads tomorrow through boost threads instead.

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

The issue is LLVM_ENABLE_THREADS that cannot be 0. I'll create a pull request.

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

Created Alexpux/MINGW-packages#905

from jucipp.

zalox avatar zalox commented on August 23, 2024

How do boost::threads compare to std::threads in unix? I guess it's cleaner to just use boost, even if that introduces longer compile time.

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

I was not sure what kind of threads the boost package used in MSYS2, but it was not the issue. I think we should use std:: if possible. std::thread for instance is probably now used more than boost::thread, and is thus more well tested on various platforms. boost::regex however, is probably used more than std::regex since it is not supported in gcc4.8, but in a year or so, we should move to std::regex:)

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

The PR in Alexpux/MINGW-packages have been merged, hopefully the new clang package will be built soon. Closing this issue then.

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

@mingwandroid sorry to bother you again, but just a quick question since there are no new clang package yet when I do pacman -Suy. Is this a problem:

$ makepkg-mingw -sLf
==> Making package: mingw-w64-clang 3.7.0-8 (Thu, Dec 10, 2015  4:14:14 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found llvm-3.7.0.src.tar.xz
  -> Found llvm-3.7.0.src.tar.xz.sig
  -> Found cfe-3.7.0.src.tar.xz
  -> Found cfe-3.7.0.src.tar.xz.sig
  -> Found compiler-rt-3.7.0.src.tar.xz
  -> Found compiler-rt-3.7.0.src.tar.xz.sig
  -> Found test-suite-3.7.0.src.tar.xz
  -> Found test-suite-3.7.0.src.tar.xz.sig
  -> Found libcxx-3.7.0.src.tar.xz
  -> Found libcxx-3.7.0.src.tar.xz.sig
  -> Found libcxxabi-3.7.0.src.tar.xz
  -> Found libcxxabi-3.7.0.src.tar.xz.sig
  -> Found clang-tools-extra-3.7.0.src.tar.xz
  -> Found clang-tools-extra-3.7.0.src.tar.xz.sig
  -> Found lld-3.7.0.src.tar.xz
  -> Found lld-3.7.0.src.tar.xz.sig
  -> Found 0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch
  -> Found 0002-use-DESTDIR-on-windows.patch
  -> Found 0012-Set-the-x86-arch-name-to-i686-for-mingw-w64.patch
  -> Found 0013-mingw-w64-dont-have-dl-library.patch
  -> Found 0014-use-DESTDIR-on-windows.patch
  -> Found 0015-Fix-the-calling-convention-of-Mingw64-long-double-va.patch
  -> Found 0016-Teach-mingw-toolchain-driver-to-properly-emit-static.patch
  -> Found 0017-Fix-PR23472-by-emitting-initialized-variable-and-its.patch
  -> Found 0031-COFF-add-the-mingw-alias-for-ImageBase.patch
  -> Found 0032-PECOFF-add-the-mingw-alias-for-ImageBase.patch
  -> Found 0033-PECOFF-add-searchLibrary-function-with-sysroot-suppo.patch
  -> Found 0034-GNU-add-support-for-linking-PECOFF.patch
  -> Found 0041-libcxx-add-support-for-mingw-w64.patch
==> Validating source files with sha256sums...
    llvm-3.7.0.src.tar.xz ... Passed
    llvm-3.7.0.src.tar.xz.sig ... Skipped
    cfe-3.7.0.src.tar.xz ... Passed
    cfe-3.7.0.src.tar.xz.sig ... Skipped
    compiler-rt-3.7.0.src.tar.xz ... Passed
    compiler-rt-3.7.0.src.tar.xz.sig ... Skipped
    test-suite-3.7.0.src.tar.xz ... Passed
    test-suite-3.7.0.src.tar.xz.sig ... Skipped
    libcxx-3.7.0.src.tar.xz ... Passed
    libcxx-3.7.0.src.tar.xz.sig ... Skipped
    libcxxabi-3.7.0.src.tar.xz ... Passed
    libcxxabi-3.7.0.src.tar.xz.sig ... Skipped
    clang-tools-extra-3.7.0.src.tar.xz ... Passed
    clang-tools-extra-3.7.0.src.tar.xz.sig ... Skipped
    lld-3.7.0.src.tar.xz ... Passed
    lld-3.7.0.src.tar.xz.sig ... Skipped
    0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch ... Passed
    0002-use-DESTDIR-on-windows.patch ... Passed
    0012-Set-the-x86-arch-name-to-i686-for-mingw-w64.patch ... Passed
    0013-mingw-w64-dont-have-dl-library.patch ... Passed
    0014-use-DESTDIR-on-windows.patch ... Passed
    0015-Fix-the-calling-convention-of-Mingw64-long-double-va.patch ... Passed
    0016-Teach-mingw-toolchain-driver-to-properly-emit-static.patch ... Passed
    0017-Fix-PR23472-by-emitting-initialized-variable-and-its.patch ... Passed
    0031-COFF-add-the-mingw-alias-for-ImageBase.patch ... Passed
    0032-PECOFF-add-the-mingw-alias-for-ImageBase.patch ... Passed
    0033-PECOFF-add-searchLibrary-function-with-sysroot-suppo.patch ... Passed
    0034-GNU-add-support-for-linking-PECOFF.patch ... Passed
    0041-libcxx-add-support-for-mingw-w64.patch ... Passed
==> Verifying source file signatures with gpg...
    llvm-3.7.0.src.tar.xz ... FAILED (unknown public key 0FC3042E345AD05D)
    cfe-3.7.0.src.tar.xz ... FAILED (unknown public key 0FC3042E345AD05D)
    compiler-rt-3.7.0.src.tar.xz ... FAILED (unknown public key 0FC3042E345AD05D)
    test-suite-3.7.0.src.tar.xz ... FAILED (unknown public key 0FC3042E345AD05D)
    libcxx-3.7.0.src.tar.xz ... FAILED (unknown public key 0FC3042E345AD05D)
    libcxxabi-3.7.0.src.tar.xz ... FAILED (unknown public key 0FC3042E345AD05D)
    clang-tools-extra-3.7.0.src.tar.xz ... FAILED (unknown public key 0FC3042E345AD05D)
    lld-3.7.0.src.tar.xz ... FAILED (unknown public key 0FC3042E345AD05D)
==> ERROR: One or more PGP signatures could not be verified!

I just do makepkg-mingw --skippgpcheck -sLf, but I guess you guys accept a new certificate on system basis? Tested to compile the clang package again just to be sure, and it works fine.

from jucipp.

mingwandroid avatar mingwandroid commented on August 23, 2024

I'll get back to you later!

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

Temporary solution for MSYS2 users (replace x86_64 with i686 for 32-bit installs):

git clone git://github.com/Alexpux/MINGW-packages
cd MINGW-packages/mingw-w64-clang
makepkg-mingw -sLf --skippgpcheck
pacman -U mingw-w64-x86_64-llvm-3.7.0-8-any.pkg.tar.xz mingw-w64-x86_64-clang-3.7.0-8-any.pkg.tar.xz 

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

@zalox do you have a version of Windows > 7? I have only Windows 7 on my virtual machines, and it seems like I do not get updates anymore from MSYS2. Might be related to msys2/MSYS2-packages#372. If you have Windows > 7, what is your output when doing:

pacman -Ss clang

? Of course after doing a pacman -Suy.

from jucipp.

zalox avatar zalox commented on August 23, 2024
$ pacman -Suy
:: Synchronizing package databases...
 mingw32 is up to date
 mingw64 is up to date
 msys is up to date
:: Starting full system upgrade...
 there is nothing to do
$ pacman -Ss clang
mingw32/mingw-w64-i686-clang 3.7.0-6
    C language family frontend for LLVM
mingw32/mingw-w64-i686-clang-analyzer 3.7.0-6
    A source code analysis framework (mingw-w64)
mingw32/mingw-w64-i686-clang-tools-extra 3.7.0-6
    Extra tools built using Clang's tooling APIs
mingw32/mingw-w64-i686-compiler-rt 3.7.0-6
    Runtime libraries for Clang and LLVM (mingw-w64)
mingw64/mingw-w64-x86_64-clang 3.7.0-6 [installed]
    C language family frontend for LLVM
mingw64/mingw-w64-x86_64-clang-analyzer 3.7.0-6
    A source code analysis framework (mingw-w64)
mingw64/mingw-w64-x86_64-clang-tools-extra 3.7.0-6
    Extra tools built using Clang's tooling APIs
mingw64/mingw-w64-x86_64-compiler-rt 3.7.0-6
    Runtime libraries for Clang and LLVM (mingw-w64)
msys/clang-svn 60106.1d5b05f-1
    C language family frontend for LLVM (mingw-w64)
msys/mingw-w64-cross-crt-clang-git 5.0.0.4592.90b8472-1 (mingw-w64-cross-toolchain mingw-w64-cross)
    MinGW-w64 CRT for cross-compiler

from jucipp.

zalox avatar zalox commented on August 23, 2024

This is from Windows Server 2012.

from jucipp.

mingwandroid avatar mingwandroid commented on August 23, 2024

Urgh, sorry, I dropped the ball on this one! Let me re-read.

from jucipp.

mingwandroid avatar mingwandroid commented on August 23, 2024

I'm reworking our mingw-w64-clang* PKGBUILDs a bit at present, have been since I first commented on this issue, and always meant to finish it then get back to you!

But @eidheim now that I look at it, you need to do:

makepkg-mingw -sLf --skippgpcheck

instead of

makepkg-mingw --skippgpcheck -sLf

.. which didn't jump out at me until now; apologies

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

Ah splendid, thought it was a Windows 7 issue, but then everything is ok, and we just relax till you are done with the rework:)

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

The issue was that I got no updated clang packages when doing pacman -Suy, the makepkg-command worked, but I'll change it above like you said still.

from jucipp.

mingwandroid avatar mingwandroid commented on August 23, 2024

@eidheim Ah, what version do you have of them?

I know this isn't the right venue, but on your build instructions for Windows/MSYS2 at https://github.com/cppit/jucipp/blob/master/docs/install.md, you might want to adopt what we have with MSYS2_ARG_CONV_EXCL at:
https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-jucipp-git/PKGBUILD#L51
so that you can use DESTDIR as-per:
https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-jucipp-git/PKGBUILD#L63

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

Version 3.7.0-6 is installed through pacman, instead of latest 3.7.0-8 (https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-clang/PKGBUILD).

Thank you, I'll have a look at the package and see if I can improve the install documentation Tomorrow.

from jucipp.

mingwandroid avatar mingwandroid commented on August 23, 2024

@eidheim mingw-w64-clang-svn might be in a state to test (being an -svn package, it might not, obviously, being as I've not tested my last commit, doubly so!) .. still, I'd appreciate testing if you're in a position to do so.

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

@mingwandroid I'm mostly interested in the libclang headers and libraries, you can see the exceptions I have done for MSYS2 here:
https://github.com/cppit/jucipp/blob/master/src/cmake.cc#L81
https://github.com/cppit/jucipp/blob/master/src/source_clang.cc#L202

I am aware of the problem with hardcoded c:/msysw32 install path, will fix that once I figure out how to get the MSYS2 install path. Have been thinking of using the WD environment variable, and just remove the two last directories. Also, this problem might be fixed in your remake, so I'll just wait for that I'm thinking.

I was thinking about the mingw-w64-clang and not the mingw-w64-clang-svn package. Have not tried the mingw-w64-clang-svn package. But I could do that if you would like.

from jucipp.

eidheim avatar eidheim commented on August 23, 2024

Upgrade MSYS2 (new clang package released), recompile and reinstall juCi++, and this problem now goes away.

from jucipp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.