pyqtdeploy-build: Errors building for macx

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

pyqtdeploy-build: Errors building for macx

Patrick Stinson-3
There are compile errors for a project which includes xml.parsers.expat. For some reason xmlparse.c does not recognize that <stdlib.h> should include HAVE_ARC4RANDOM_BUF for macOS, resulting in the following compile error:


#if !defined(HAVE_GETRANDOM) && !defined(HAVE_SYSCALL_GETRANDOM) \
    && !defined(HAVE_ARC4RANDOM_BUF) && !defined(HAVE_ARC4RANDOM) \
    && !defined(XML_DEV_URANDOM) \
    && !defined(_WIN32) \
    && !defined(XML_POOR_ENTROPY)
# error  \
    You do not have support for any sources of high quality entropy \
    enabled.  For end user security, that is probably not what you want. \
    \
    Your options include: \
      * Linux + glibc >=2.25 (getrandom): HAVE_GETRANDOM, \
      * Linux + glibc <2.25 (syscall SYS_getrandom): HAVE_SYSCALL_GETRANDOM, \
      * BSD / macOS >=10.7 (arc4random_buf): HAVE_ARC4RANDOM_BUF, \
      * BSD / macOS <10.7 (arc4random): HAVE_ARC4RANDOM, \
      * libbsd (arc4random_buf): HAVE_ARC4RANDOM_BUF + HAVE_LIBBSD, \
      * libbsd (arc4random): HAVE_ARC4RANDOM + HAVE_LIBBSD, \
      * Linux / BSD / macOS (/dev/urandom): XML_DEV_URANDOM \
      * Windows (RtlGenRandom): _WIN32. \
    \
    If insist on not using any of these, bypass this error by defining \
    XML_POOR_ENTROPY; you have been warned. \
    \
    If you have reasons to patch this detection code away or need changes \
    to the build system, please open a bug.  Thank you!
#endif

I have attached a bare-bones skeleton which imports qt and xml.parsers.expat.

If I add #define HAVE_ARC4RANDOM_BUF (which should be available via stdlib.h on macos) then the file compiles but I get the following (unrelated) linker errors:

Undefined symbols for architecture x86_64:
  "_ffi_call_unix64", referenced from:
      _ffi_call in x86-ffi64.o
  "_ffi_closure_unix64", referenced from:
      _ffi_prep_closure in x86-ffi64.o
     (maybe you meant: _ffi_closure_unix64_inner)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


I have had little success figuring out what the story is on those ffi symbols.



_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

pyqt-skel.zip (3K) Download Attachment
smime.p7s (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: pyqtdeploy-build: Errors building for macx

Patrick Stinson-3
Looks like darwin64.S is not included in the Xcode target. If I add it it resolves the symbols, but then leads to even more problems:

ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
duplicate symbol _ffi_closure_free in:
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
duplicate symbol _ffi_closure_alloc in:
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
ld: 2 duplicate symbols for architecture x86_64

It looks like the setup for including python module sources (for ctypes I think?) are kind of a mess?

-P

On Jan 9, 2018, at 1:40 PM, Patrick Stinson <[hidden email]> wrote:

There are compile errors for a project which includes xml.parsers.expat. For some reason xmlparse.c does not recognize that <stdlib.h> should include HAVE_ARC4RANDOM_BUF for macOS, resulting in the following compile error:


#if !defined(HAVE_GETRANDOM) && !defined(HAVE_SYSCALL_GETRANDOM) \
    && !defined(HAVE_ARC4RANDOM_BUF) && !defined(HAVE_ARC4RANDOM) \
    && !defined(XML_DEV_URANDOM) \
    && !defined(_WIN32) \
    && !defined(XML_POOR_ENTROPY)
# error  \
    You do not have support for any sources of high quality entropy \
    enabled.  For end user security, that is probably not what you want. \
    \
    Your options include: \
      * Linux + glibc >=2.25 (getrandom): HAVE_GETRANDOM, \
      * Linux + glibc <2.25 (syscall SYS_getrandom): HAVE_SYSCALL_GETRANDOM, \
      * BSD / macOS >=10.7 (arc4random_buf): HAVE_ARC4RANDOM_BUF, \
      * BSD / macOS <10.7 (arc4random): HAVE_ARC4RANDOM, \
      * libbsd (arc4random_buf): HAVE_ARC4RANDOM_BUF + HAVE_LIBBSD, \
      * libbsd (arc4random): HAVE_ARC4RANDOM + HAVE_LIBBSD, \
      * Linux / BSD / macOS (/dev/urandom): XML_DEV_URANDOM \
      * Windows (RtlGenRandom): _WIN32. \
    \
    If insist on not using any of these, bypass this error by defining \
    XML_POOR_ENTROPY; you have been warned. \
    \
    If you have reasons to patch this detection code away or need changes \
    to the build system, please open a bug.  Thank you!
#endif

I have attached a bare-bones skeleton which imports qt and xml.parsers.expat.

If I add #define HAVE_ARC4RANDOM_BUF (which should be available via stdlib.h on macos) then the file compiles but I get the following (unrelated) linker errors:

Undefined symbols for architecture x86_64:
  "_ffi_call_unix64", referenced from:
      _ffi_call in x86-ffi64.o
  "_ffi_closure_unix64", referenced from:
      _ffi_prep_closure in x86-ffi64.o
     (maybe you meant: _ffi_closure_unix64_inner)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


I have had little success figuring out what the story is on those ffi symbols.

<pyqt-skel.zip>


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

smime.p7s (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: pyqtdeploy-build: Errors building for macx

Patrick Stinson-3
FWIW, the problems in this thread also happen with a clean pyqt-skeleton project that imports ctypes.

On Jan 9, 2018, at 5:12 PM, Patrick Stinson <[hidden email]> wrote:

Looks like darwin64.S is not included in the Xcode target. If I add it it resolves the symbols, but then leads to even more problems:

ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
duplicate symbol _ffi_closure_free in:
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
duplicate symbol _ffi_closure_alloc in:
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
ld: 2 duplicate symbols for architecture x86_64

It looks like the setup for including python module sources (for ctypes I think?) are kind of a mess?

-P

On Jan 9, 2018, at 1:40 PM, Patrick Stinson <[hidden email]> wrote:

There are compile errors for a project which includes xml.parsers.expat. For some reason xmlparse.c does not recognize that <stdlib.h> should include HAVE_ARC4RANDOM_BUF for macOS, resulting in the following compile error:


#if !defined(HAVE_GETRANDOM) && !defined(HAVE_SYSCALL_GETRANDOM) \
    && !defined(HAVE_ARC4RANDOM_BUF) && !defined(HAVE_ARC4RANDOM) \
    && !defined(XML_DEV_URANDOM) \
    && !defined(_WIN32) \
    && !defined(XML_POOR_ENTROPY)
# error  \
    You do not have support for any sources of high quality entropy \
    enabled.  For end user security, that is probably not what you want. \
    \
    Your options include: \
      * Linux + glibc >=2.25 (getrandom): HAVE_GETRANDOM, \
      * Linux + glibc <2.25 (syscall SYS_getrandom): HAVE_SYSCALL_GETRANDOM, \
      * BSD / macOS >=10.7 (arc4random_buf): HAVE_ARC4RANDOM_BUF, \
      * BSD / macOS <10.7 (arc4random): HAVE_ARC4RANDOM, \
      * libbsd (arc4random_buf): HAVE_ARC4RANDOM_BUF + HAVE_LIBBSD, \
      * libbsd (arc4random): HAVE_ARC4RANDOM + HAVE_LIBBSD, \
      * Linux / BSD / macOS (/dev/urandom): XML_DEV_URANDOM \
      * Windows (RtlGenRandom): _WIN32. \
    \
    If insist on not using any of these, bypass this error by defining \
    XML_POOR_ENTROPY; you have been warned. \
    \
    If you have reasons to patch this detection code away or need changes \
    to the build system, please open a bug.  Thank you!
#endif

I have attached a bare-bones skeleton which imports qt and xml.parsers.expat.

If I add #define HAVE_ARC4RANDOM_BUF (which should be available via stdlib.h on macos) then the file compiles but I get the following (unrelated) linker errors:

Undefined symbols for architecture x86_64:
  "_ffi_call_unix64", referenced from:
      _ffi_call in x86-ffi64.o
  "_ffi_closure_unix64", referenced from:
      _ffi_prep_closure in x86-ffi64.o
     (maybe you meant: _ffi_closure_unix64_inner)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


I have had little success figuring out what the story is on those ffi symbols.

<pyqt-skel.zip>



_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

smime.p7s (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: pyqtdeploy-build: Errors building for macx

Patrick Stinson-3
And with pyqtdeploy-build for iOS the problem is that Xcode can’t find ffi.h from _ctypes.c:107.

On Jan 9, 2018, at 5:35 PM, Patrick Stinson <[hidden email]> wrote:

FWIW, the problems in this thread also happen with a clean pyqt-skeleton project that imports ctypes.

On Jan 9, 2018, at 5:12 PM, Patrick Stinson <[hidden email]> wrote:

Looks like darwin64.S is not included in the Xcode target. If I add it it resolves the symbols, but then leads to even more problems:

ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
duplicate symbol _ffi_closure_free in:
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
duplicate symbol _ffi_closure_alloc in:
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
ld: 2 duplicate symbols for architecture x86_64

It looks like the setup for including python module sources (for ctypes I think?) are kind of a mess?

-P

On Jan 9, 2018, at 1:40 PM, Patrick Stinson <[hidden email]> wrote:

There are compile errors for a project which includes xml.parsers.expat. For some reason xmlparse.c does not recognize that <stdlib.h> should include HAVE_ARC4RANDOM_BUF for macOS, resulting in the following compile error:


#if !defined(HAVE_GETRANDOM) && !defined(HAVE_SYSCALL_GETRANDOM) \
    && !defined(HAVE_ARC4RANDOM_BUF) && !defined(HAVE_ARC4RANDOM) \
    && !defined(XML_DEV_URANDOM) \
    && !defined(_WIN32) \
    && !defined(XML_POOR_ENTROPY)
# error  \
    You do not have support for any sources of high quality entropy \
    enabled.  For end user security, that is probably not what you want. \
    \
    Your options include: \
      * Linux + glibc >=2.25 (getrandom): HAVE_GETRANDOM, \
      * Linux + glibc <2.25 (syscall SYS_getrandom): HAVE_SYSCALL_GETRANDOM, \
      * BSD / macOS >=10.7 (arc4random_buf): HAVE_ARC4RANDOM_BUF, \
      * BSD / macOS <10.7 (arc4random): HAVE_ARC4RANDOM, \
      * libbsd (arc4random_buf): HAVE_ARC4RANDOM_BUF + HAVE_LIBBSD, \
      * libbsd (arc4random): HAVE_ARC4RANDOM + HAVE_LIBBSD, \
      * Linux / BSD / macOS (/dev/urandom): XML_DEV_URANDOM \
      * Windows (RtlGenRandom): _WIN32. \
    \
    If insist on not using any of these, bypass this error by defining \
    XML_POOR_ENTROPY; you have been warned. \
    \
    If you have reasons to patch this detection code away or need changes \
    to the build system, please open a bug.  Thank you!
#endif

I have attached a bare-bones skeleton which imports qt and xml.parsers.expat.

If I add #define HAVE_ARC4RANDOM_BUF (which should be available via stdlib.h on macos) then the file compiles but I get the following (unrelated) linker errors:

Undefined symbols for architecture x86_64:
  "_ffi_call_unix64", referenced from:
      _ffi_call in x86-ffi64.o
  "_ffi_closure_unix64", referenced from:
      _ffi_prep_closure in x86-ffi64.o
     (maybe you meant: _ffi_closure_unix64_inner)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


I have had little success figuring out what the story is on those ffi symbols.

<pyqt-skel.zip>




_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

smime.p7s (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: pyqtdeploy-build: Errors building for macx

Phil Thompson-5
In reply to this post by Patrick Stinson-3
These should both be fixed - tested on macOS and Linux but not Windows.

Phil

> On 10 Jan 2018, at 1:12 am, Patrick Stinson <[hidden email]> wrote:
>
> Looks like darwin64.S is not included in the Xcode target. If I add it it resolves the symbols, but then leads to even more problems:
>
> ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
> duplicate symbol _ffi_closure_free in:
>     /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
>     /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
> duplicate symbol _ffi_closure_alloc in:
>     /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
>     /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
> ld: 2 duplicate symbols for architecture x86_64
>
> It looks like the setup for including python module sources (for ctypes I think?) are kind of a mess?
>
> -P
>
>> On Jan 9, 2018, at 1:40 PM, Patrick Stinson <[hidden email]> wrote:
>>
>> There are compile errors for a project which includes xml.parsers.expat. For some reason xmlparse.c does not recognize that <stdlib.h> should include HAVE_ARC4RANDOM_BUF for macOS, resulting in the following compile error:
>>
>>
>> #if !defined(HAVE_GETRANDOM) && !defined(HAVE_SYSCALL_GETRANDOM) \
>>     && !defined(HAVE_ARC4RANDOM_BUF) && !defined(HAVE_ARC4RANDOM) \
>>     && !defined(XML_DEV_URANDOM) \
>>     && !defined(_WIN32) \
>>     && !defined(XML_POOR_ENTROPY)
>> # error  \
>>     You do not have support for any sources of high quality entropy \
>>     enabled.  For end user security, that is probably not what you want. \
>>     \
>>     Your options include: \
>>       * Linux + glibc >=2.25 (getrandom): HAVE_GETRANDOM, \
>>       * Linux + glibc <2.25 (syscall SYS_getrandom): HAVE_SYSCALL_GETRANDOM, \
>>       * BSD / macOS >=10.7 (arc4random_buf): HAVE_ARC4RANDOM_BUF, \
>>       * BSD / macOS <10.7 (arc4random): HAVE_ARC4RANDOM, \
>>       * libbsd (arc4random_buf): HAVE_ARC4RANDOM_BUF + HAVE_LIBBSD, \
>>       * libbsd (arc4random): HAVE_ARC4RANDOM + HAVE_LIBBSD, \
>>       * Linux / BSD / macOS (/dev/urandom): XML_DEV_URANDOM \
>>       * Windows (RtlGenRandom): _WIN32. \
>>     \
>>     If insist on not using any of these, bypass this error by defining \
>>     XML_POOR_ENTROPY; you have been warned. \
>>     \
>>     If you have reasons to patch this detection code away or need changes \
>>     to the build system, please open a bug.  Thank you!
>> #endif
>>
>> I have attached a bare-bones skeleton which imports qt and xml.parsers.expat.
>>
>> If I add #define HAVE_ARC4RANDOM_BUF (which should be available via stdlib.h on macos) then the file compiles but I get the following (unrelated) linker errors:
>>
>> Undefined symbols for architecture x86_64:
>>   "_ffi_call_unix64", referenced from:
>>       _ffi_call in x86-ffi64.o
>>   "_ffi_closure_unix64", referenced from:
>>       _ffi_prep_closure in x86-ffi64.o
>>      (maybe you meant: _ffi_closure_unix64_inner)
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>
>>
>> I have had little success figuring out what the story is on those ffi symbols.
>>
>> <pyqt-skel.zip>
>
> _______________________________________________
> PyQt mailing list    [hidden email]
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: pyqtdeploy-build: Errors building for macx

Patrick Stinson-3
Still seeing the unresolved ffi symbols for macOS in changeset 1045. Do I need to rebuild the macos-64 sysroot after these changes?


> On Jan 10, 2018, at 8:39 AM, Phil Thompson <[hidden email]> wrote:
>
> These should both be fixed - tested on macOS and Linux but not Windows.
>
> Phil
>
>> On 10 Jan 2018, at 1:12 am, Patrick Stinson <[hidden email]> wrote:
>>
>> Looks like darwin64.S is not included in the Xcode target. If I add it it resolves the symbols, but then leads to even more problems:
>>
>> ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
>> duplicate symbol _ffi_closure_free in:
>>    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
>>    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
>> duplicate symbol _ffi_closure_alloc in:
>>    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
>>    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
>> ld: 2 duplicate symbols for architecture x86_64
>>
>> It looks like the setup for including python module sources (for ctypes I think?) are kind of a mess?
>>
>> -P
>>
>>> On Jan 9, 2018, at 1:40 PM, Patrick Stinson <[hidden email]> wrote:
>>>
>>> There are compile errors for a project which includes xml.parsers.expat. For some reason xmlparse.c does not recognize that <stdlib.h> should include HAVE_ARC4RANDOM_BUF for macOS, resulting in the following compile error:
>>>
>>>
>>> #if !defined(HAVE_GETRANDOM) && !defined(HAVE_SYSCALL_GETRANDOM) \
>>>    && !defined(HAVE_ARC4RANDOM_BUF) && !defined(HAVE_ARC4RANDOM) \
>>>    && !defined(XML_DEV_URANDOM) \
>>>    && !defined(_WIN32) \
>>>    && !defined(XML_POOR_ENTROPY)
>>> # error  \
>>>    You do not have support for any sources of high quality entropy \
>>>    enabled.  For end user security, that is probably not what you want. \
>>>    \
>>>    Your options include: \
>>>      * Linux + glibc >=2.25 (getrandom): HAVE_GETRANDOM, \
>>>      * Linux + glibc <2.25 (syscall SYS_getrandom): HAVE_SYSCALL_GETRANDOM, \
>>>      * BSD / macOS >=10.7 (arc4random_buf): HAVE_ARC4RANDOM_BUF, \
>>>      * BSD / macOS <10.7 (arc4random): HAVE_ARC4RANDOM, \
>>>      * libbsd (arc4random_buf): HAVE_ARC4RANDOM_BUF + HAVE_LIBBSD, \
>>>      * libbsd (arc4random): HAVE_ARC4RANDOM + HAVE_LIBBSD, \
>>>      * Linux / BSD / macOS (/dev/urandom): XML_DEV_URANDOM \
>>>      * Windows (RtlGenRandom): _WIN32. \
>>>    \
>>>    If insist on not using any of these, bypass this error by defining \
>>>    XML_POOR_ENTROPY; you have been warned. \
>>>    \
>>>    If you have reasons to patch this detection code away or need changes \
>>>    to the build system, please open a bug.  Thank you!
>>> #endif
>>>
>>> I have attached a bare-bones skeleton which imports qt and xml.parsers.expat.
>>>
>>> If I add #define HAVE_ARC4RANDOM_BUF (which should be available via stdlib.h on macos) then the file compiles but I get the following (unrelated) linker errors:
>>>
>>> Undefined symbols for architecture x86_64:
>>>  "_ffi_call_unix64", referenced from:
>>>      _ffi_call in x86-ffi64.o
>>>  "_ffi_closure_unix64", referenced from:
>>>      _ffi_prep_closure in x86-ffi64.o
>>>     (maybe you meant: _ffi_closure_unix64_inner)
>>> ld: symbol(s) not found for architecture x86_64
>>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>>
>>>
>>> I have had little success figuring out what the story is on those ffi symbols.
>>>
>>> <pyqt-skel.zip>
>>
>> _______________________________________________
>> PyQt mailing list    [hidden email]
>> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

smime.p7s (1K) Download Attachment