You are not logged in.

#26 2017-05-05 03:00:18

optlink
Member
Registered: 2017-05-02
Posts: 14

Re: Building dotnet with clang 4.0 and associated issues

Interesting that it worked for you. I tried that and it still wouldn't link. I will have to try again following your steps. Thanks.

EDIT: I had to add a few lines to the package() function to actually move the libraries but I have managed to successfully restore packages following TioDuke's steps.

My libcurl package() function:

package() {
  cd curl-${pkgver}

  make -C lib DESTDIR="${pkgdir}" install

  mkdir "${pkgdir}"/usr/lib/openssl-1.0
  mv "${pkgdir}"/usr/lib/libcurl.* "${pkgdir}"/usr/lib/openssl-1.0
  rm "${pkgdir}"/usr/lib/openssl-1.0/libcurl.{a,la}

  install -dm 755 "${pkgdir}"/usr/share/licenses
  ln -s curl "${pkgdir}"/usr/share/licenses/${pkgname}
}

Last edited by optlink (2017-05-05 08:13:14)

Offline

#27 2017-05-05 09:38:51

phib
Member
Registered: 2017-05-02
Posts: 4

Re: Building dotnet with clang 4.0 and associated issues

I can confirm TioDuke's method!
Working perfectly, i tried a few projects and he was able to restore and run everything, thank you!

Offline

#28 2017-05-05 13:09:31

Pezo
Member
From: Austria
Registered: 2015-04-08
Posts: 14

Re: Building dotnet with clang 4.0 and associated issues

I was also able to build and it seems to work, however I noticed that `System.Net.Http.Native.so` now links against both `libssl.so.1.0.0` and `libssl.so.1.1`...

Offline

#29 2017-05-05 15:04:01

dman
Member
Registered: 2017-05-05
Posts: 2

Re: Building dotnet with clang 4.0 and associated issues

I follow exactly TioDuke step but still cannot build, what did I miss ?

Offline

#30 2017-05-05 16:29:59

kylesferrazza
Member
Registered: 2017-05-04
Posts: 8

Re: Building dotnet with clang 4.0 and associated issues

TioDuke wrote:

I managed to get System.Net.Http.Native linked against libcurl-openssl-1.0.

Here"s what I did :

1) I had to change libcurl-openssl-1.0 so that the libraries get installed inside /usr/lib/openssl-1.0 without being renamed :

# Maintainer: Michael Straube <straubem@gmx.de>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Piotr Balcerowski <piotr@balcerowski.org>

pkgname=libcurl-openssl-1.0
pkgver=7.54.0
pkgrel=1
pkgdesc='An URL retrieval library (build against openssl-1.0)'
arch=('i686' 'x86_64')
url='https://curl.haxx.se'
license=('MIT')
depends=('curl' 'glibc' 'krb5' 'openssl-1.0' 'libpsl' 'zlib' 'libssh2.so')
options=('strip')
source=("https://curl.haxx.se/download/curl-${pkgver}.tar.gz")
sha256sums=('a84b635941c74e26cce69dd817489bec687eb1f230e7d1897fc5b5f108b59adf')

build() {
  cd curl-${pkgver}

  export PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig

  ./configure \
    --prefix='/usr' \
    --disable-ldap \
    --disable-ldaps \
    --disable-manual \
    --enable-ipv6 \
    --enable-threaded-resolver \
    --with-gssapi \
    --with-random='/dev/urandom' \
    --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt' --libdir=/usr/lib/openssl-1.0

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make -C lib
}

package() {
  cd curl-${pkgver}

  make -C lib DESTDIR="${pkgdir}" install

  rm "${pkgdir}"/usr/lib/openssl-1.0/libcurl.{a,la}

  install -dm 755 "${pkgdir}"/usr/share/licenses
  ln -s curl "${pkgdir}"/usr/share/licenses/${pkgname}
}

2) In dotnet's package, patch CMakeLists file to not search for curl following Pezo's instructions

3) Finally modify ./src/Native/build-native.sh x64 release line to include the following cmake argument:

cmakeargs -DCURL_LIBRARIES=/usr/lib/openssl-1.0/libcurl.so

And it links against libcurl-openssl-1.0. I tested with telemetry on and it seems to work fine. Good luck.

Are you able to fix the dotnet and libcurl pkgbuilds so that the maintainers can update them?

Offline

#31 2017-05-05 17:41:00

kylesferrazza
Member
Registered: 2017-05-04
Posts: 8

Re: Building dotnet with clang 4.0 and associated issues

kylesferrazza wrote:

Are you able to fix the dotnet and libcurl pkgbuilds so that the maintainers can update them?

I tried to edit the PKGBUILDs using the outlined methods but still cannot compile dotnet

Last edited by kylesferrazza (2017-05-05 20:58:15)

Offline

#32 2017-05-05 17:47:20

tinchou
Member
Registered: 2017-05-05
Posts: 1

Re: Building dotnet with clang 4.0 and associated issues

Why do you think the libcurl-openssl-1.0 maintainer decided to do that? I can provide the changes TioDuke suggested, but I'm not sure what the consequences are.

Last edited by tinchou (2017-05-05 17:47:47)

Offline

#33 2017-05-05 21:22:36

Reverbed
Member
Registered: 2017-05-05
Posts: 1

Re: Building dotnet with clang 4.0 and associated issues

kylesferrazza wrote:
kylesferrazza wrote:

Are you able to fix the dotnet and libcurl pkgbuilds so that the maintainers can update them?

I tried to edit the PKGBUILDs using the outlined methods but still cannot compile dotnet

Thanks for the hard work, finally able to build dotnet.
However, running dotnet restore causes a segmentation failure.

Also, why is your package gone?

Offline

#34 2017-05-05 21:45:50

kylesferrazza
Member
Registered: 2017-05-04
Posts: 8

Re: Building dotnet with clang 4.0 and associated issues

Reverbed wrote:
kylesferrazza wrote:
kylesferrazza wrote:

Are you able to fix the dotnet and libcurl pkgbuilds so that the maintainers can update them?

I tried to edit the PKGBUILDs using the outlined methods but still cannot compile dotnet

Thanks for the hard work, finally able to build dotnet.
However, running dotnet restore causes a segmentation failure.

Also, why is your package gone?

I couldn't fix the segfault
I'll put it back up in case someone else can fix it
EDIT: If anyone can fix this, please go ahead
https://aur.archlinux.org/cgit/aur.git/ … tnet-fixed

Last edited by kylesferrazza (2017-05-05 21:49:55)

Offline

#35 2017-05-05 22:10:11

optlink
Member
Registered: 2017-05-02
Posts: 14

Re: Building dotnet with clang 4.0 and associated issues

kylesferrazza wrote:
Reverbed wrote:
kylesferrazza wrote:

I tried to edit the PKGBUILDs using the outlined methods but still cannot compile dotnet

Thanks for the hard work, finally able to build dotnet.
However, running dotnet restore causes a segmentation failure.

Also, why is your package gone?

I couldn't fix the segfault
I'll put it back up in case someone else can fix it
EDIT: If anyone can fix this, please go ahead
https://aur.archlinux.org/cgit/aur.git/ … tnet-fixed

Are you building the modified libcurl? Have you checked what System.Net.Http.Native.so is linked to? I might be able to help if you read the thread and narrow down your issue.

Offline

#36 2017-05-05 22:14:55

kylesferrazza
Member
Registered: 2017-05-04
Posts: 8

Re: Building dotnet with clang 4.0 and associated issues

optlink wrote:
kylesferrazza wrote:
Reverbed wrote:

Thanks for the hard work, finally able to build dotnet.
However, running dotnet restore causes a segmentation failure.

Also, why is your package gone?

I couldn't fix the segfault
I'll put it back up in case someone else can fix it
EDIT: If anyone can fix this, please go ahead
https://aur.archlinux.org/cgit/aur.git/ … tnet-fixed

Are you building the modified libcurl? Have you checked what System.Net.Http.Native.so is linked to? I might be able to help if you read the thread and narrow down your issue.

Using the regular libcurl I get a segfault, and using the modified libcurl I get all kinds of struct forward declaration errors

Offline

#37 2017-05-05 22:25:04

optlink
Member
Registered: 2017-05-02
Posts: 14

Re: Building dotnet with clang 4.0 and associated issues

kylesferrazza wrote:
optlink wrote:
kylesferrazza wrote:

I couldn't fix the segfault
I'll put it back up in case someone else can fix it
EDIT: If anyone can fix this, please go ahead
https://aur.archlinux.org/cgit/aur.git/ … tnet-fixed

Are you building the modified libcurl? Have you checked what System.Net.Http.Native.so is linked to? I might be able to help if you read the thread and narrow down your issue.

Using the regular libcurl I get a segfault, and using the modified libcurl I get all kinds of struct forward declaration errors

These forward declaration errors occur during building of the dotnet package or somewhere else?

Offline

#38 2017-05-05 22:29:16

kylesferrazza
Member
Registered: 2017-05-04
Posts: 8

Re: Building dotnet with clang 4.0 and associated issues

optlink wrote:

These forward declaration errors occur during building of the dotnet package or somewhere else?

I'm pretty sure during building of dotnet but it might've been something else
I'm not home right now, I will post more info later

Offline

#39 2017-05-06 01:09:57

dman
Member
Registered: 2017-05-05
Posts: 2

Re: Building dotnet with clang 4.0 and associated issues

I'm pretty sure during building of dotnet but it might've been something else

I can confirm it during building dotnet

This is the error I get https://clbin.com/B1v1w

And it all about System.Security.Cryptography.Native

Offline

#40 2017-05-06 01:23:57

optlink
Member
Registered: 2017-05-02
Posts: 14

Re: Building dotnet with clang 4.0 and associated issues

dman wrote:

I'm pretty sure during building of dotnet but it might've been something else

I can confirm it during building dotnet

This is the error I get https://clbin.com/B1v1w

And it all about System.Security.Cryptography.Native

That is due to building against the incorrect version of OpenSSL. I just took a look at the PKGBUILD and I'm not sure where those directives came from but they are not at all what was mentioned here in this thread. Further, you need to link against libcurl-openssl-1.0 or you will get failures on dotnet restore and other network related methods. Here is the build command you should have for corefx:

CPLUS_INCLUDE_PATH=/usr/include/openssl-1.0 C_INCLUDE_PATH=/usr/include/openssl-1.0 ./src/Native/build-native.sh x64 release cmakeargs -DOPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0 cmakeargs -DOPENSSL_SSL_LIBRARY=/usr/lib/openssl-1.0/libssl.so cmakeargs -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/openssl-1.0/libcrypto.so cmakeargs -DCURL_LIBRARIES=/usr/lib/openssl-1.0/libcurl.so

Last edited by optlink (2017-05-06 01:26:07)

Offline

#41 2017-05-06 04:06:54

kylesferrazza
Member
Registered: 2017-05-04
Posts: 8

Re: Building dotnet with clang 4.0 and associated issues

optlink wrote:

That is due to building against the incorrect version of OpenSSL. I just took a look at the PKGBUILD and I'm not sure where those directives came from but they are not at all what was mentioned here in this thread. Further, you need to link against libcurl-openssl-1.0 or you will get failures on dotnet restore and other network related methods. Here is the build command you should have for corefx:

CPLUS_INCLUDE_PATH=/usr/include/openssl-1.0 C_INCLUDE_PATH=/usr/include/openssl-1.0 ./src/Native/build-native.sh x64 release cmakeargs -DOPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0 cmakeargs -DOPENSSL_SSL_LIBRARY=/usr/lib/openssl-1.0/libssl.so cmakeargs -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/openssl-1.0/libcrypto.so cmakeargs -DCURL_LIBRARIES=/usr/lib/openssl-1.0/libcurl.so

I changed the build command:
dotnet
libcurl-openssl-1.0

Still getting the segfault when using dotnet
Did I do something wrong?

Last edited by kylesferrazza (2017-05-06 04:27:38)

Offline

#42 2017-05-06 04:15:44

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: Building dotnet with clang 4.0 and associated issues

Do how many of these "-fixed" packages am I going to have to submit delete requests for? Duplicates are not allowed in the AUR

Offline

#43 2017-05-06 04:28:24

kylesferrazza
Member
Registered: 2017-05-04
Posts: 8

Re: Building dotnet with clang 4.0 and associated issues

Scimmia wrote:

Do how many of these "-fixed" packages am I going to have to submit delete requests for? Duplicates are not allowed in the AUR

Deleted

Offline

#44 2017-05-06 04:35:57

optlink
Member
Registered: 2017-05-02
Posts: 14

Re: Building dotnet with clang 4.0 and associated issues

These are what I was able to build with: https://www.dropbox.com/sh/kgh9qnhcgzbe … l8vMa?dl=0
Hopefully they will work for you.

Offline

#45 2017-05-06 05:10:34

kylesferrazza
Member
Registered: 2017-05-04
Posts: 8

Re: Building dotnet with clang 4.0 and associated issues

optlink wrote:

These are what I was able to build with: https://www.dropbox.com/sh/kgh9qnhcgzbe … l8vMa?dl=0
Hopefully they will work for you.

Worked!! Thanks

Offline

#46 2017-05-09 04:17:05

Lazze
Member
From: Bangkok, Thailand
Registered: 2008-09-28
Posts: 133

Re: Building dotnet with clang 4.0 and associated issues

Worked for me too, thanks

Offline

#47 2017-05-10 07:36:41

christophwu
Member
Registered: 2014-10-21
Posts: 5

Re: Building dotnet with clang 4.0 and associated issues

I can confirm that it compiles successfully and I'm able to build dotnet solution/projects again. Thanks a lot!

Offline

#48 2017-05-10 07:52:15

Pezo
Member
From: Austria
Registered: 2015-04-08
Posts: 14

Re: Building dotnet with clang 4.0 and associated issues

So is there any way we can get this into the AUR?
With libcurl-openssl-1.0 needing to be modified probably not, right?

edit: I just saw that there's a discussion about this on the libcurl-openssl-1.0 AUR page.

Last edited by Pezo (2017-05-10 08:45:21)

Offline

#49 2017-05-10 17:07:40

jmg5e
Member
Registered: 2017-05-10
Posts: 1

Re: Building dotnet with clang 4.0 and associated issues

I was able to build dotnet 1.1.2 using this process. Everything seems to be working just fine.

Offline

#50 2017-07-02 03:52:57

BornInTheDark
Member
Registered: 2017-07-02
Posts: 1

Re: Building dotnet with clang 4.0 and associated issues

optlink wrote:

These are what I was able to build with: https://www.dropbox.com/sh/kgh9qnhcgzbe … l8vMa?dl=0
Hopefully they will work for you.


I was also able to successfully compile dotnet with these, and it works perfectly.

Offline

Board footer

Powered by FluxBB