[gnutls-devel] libtasn1 | Cross compilation issue (#28)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed Jun 24 14:47:10 CEST 2020



Fernando Martinez created an issue: https://gitlab.com/gnutls/libtasn1/-/issues/28



## Description of problem:

I am trying to cross compile libtasn1 4.16 to armv7 iOS, but i am getting a linker error that i can't solve

```
Undefined symbols for architecture armv7:
  "_c_isdigit", referenced from:
      __asn1_expand_object_id in libtasn1.a(parser_aux.o)
      __asn1_check_identifier in libtasn1.a(parser_aux.o)
```

## Version of libtasn1 used:

4.16

https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.16.0.tar.gz

## Distributor of libtasn1 (e.g., Ubuntu, Fedora, RHEL)

I am compiling the source code itself

## How reproducible:

```
export SDKPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
export MIN_IOS_VERSION=10.0
export HOST=arm-apple-darwin
export BUILD=armv7
export LDFLAGS_NATIVE="-isysroot $SDKPATH "
export ARCHES=armv7

export LDFLAGS=$LDFLAGS_NATIVE
export CFLAGS="-arch $ARCH $LDFLAGS -miphoneos-version-min=$MIN_IOS_VERSION -fembed-bitcode -Wno-sign-compare "
./configure --host=$HOST --build=$BUILD --enable-static --disable-shared --prefix=$PWD/build/$ARCH && make && make install
```
## Actual results:

```
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in lib
Making all in gl
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
make[5]: Nothing to be done for `all-am'.
  CC       coding.lo
  CC       decoding.lo
  CC       element.lo
  CC       errors.lo
  CC       gstr.lo
  CC       parser_aux.lo
  CC       structure.lo
  CC       version.lo
  CCLD     libtasn1.la
Making all in src
  CC       asn1Parser.o
  CCLD     asn1Parser
Undefined symbols for architecture armv7:
  "_c_isdigit", referenced from:
      __asn1_expand_object_id in libtasn1.a(parser_aux.o)
      __asn1_check_identifier in libtasn1.a(parser_aux.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [asn1Parser] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
```

## Expected results:

I see the lib now has a custom c-ctype implementation and it should be included for cross compilation

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/libtasn1/-/issues/28
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20200624/f3baea9d/attachment.html>


More information about the Gnutls-devel mailing list