Skip to content
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

Fix #134, FreeBSD Support, additional introspections #136

Closed
wants to merge 17 commits into from

Conversation

@tony
Copy link
Contributor

tony commented Jun 12, 2016

  • Fix HAVE_SYS_SYS_DOMAIN_H (sys/sys_domain.h, OS X system)
  • setpgrp introspection
  • Convert cmake/fficonfig.h → cmake/fficonfig.h.in

Tested on

  • FreeBSD 11-CURRENT x86_64, CMake 3.5.2, clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
  • OS X 10.11.5 x86_64 CMake 3.5.2, Apple LLVM version 7.3.0 (clang-703.0.31)
@tony tony force-pushed the tony:freebsd-support branch from 387f79b to 2dc4b16 Jun 12, 2016
@tony
Copy link
Contributor Author

tony commented Jun 14, 2016

Greets @jcfr am I on the right track with this?

@@ -304,7 +304,7 @@ check_include_files(sys/ioctl.h HAVE_SYS_IOCTL_H)
check_include_files("sys/types.h;sys/kern_control.h" HAVE_SYS_KERN_CONTROL_H)
check_include_files(sys/sendfile.h HAVE_SYS_SENDFILE_H)
check_include_files(sys/syscall.h HAVE_SYS_SYSCALL_H)
check_include_files(sys/domain.h HAVE_SYS_SYS_DOMAIN_H)
check_include_files(sys/sys_domain.h HAVE_SYS_SYS_DOMAIN_H)

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

Good catch.

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor

This commit has been integrated into master as 6f3f1ec

@@ -304,6 +304,7 @@ else()
_ctypes/libffi/src/${_libffi_system_dir}/unix64.S
)
endif()
configure_file(${CMAKE_SOURCE_DIR}/cmake/fficonfig.h.in ${CMAKE_SOURCE_DIR}/cmake/fficonfig.h)

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

Configured files shouldn't be added to the source tree.

Instead, you could do:

configure_file(
    ${CMAKE_SOURCE_DIR}/cmake/fficonfig.h.in
    ${INCLUDE_BUILD_DIR}/fficonfig.h
    )
@@ -13,7 +13,7 @@
/* #undef C_ALLOCA */

/* Define to the flags needed for the .section .eh_frame directive. */
#define EH_FRAME_FLAGS "aw"

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

Generally speaking, #define should not be systematically replaced by #cmakedefine.

Only the macros having a corresponding variable set during CMake configuration should be defined using #cmakedefine.

@@ -28,14 +28,14 @@
/* #undef FFI_NO_STRUCTS */

/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
#cmakedefine HAVE_ALLOCA 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

Missing configure test.
Could be added after this line:

check_symbol_exists(altzone "${CFG_HEADERS}" HAVE_ALTZONE)

This comment has been minimized.

Copy link
@tony

tony Jun 15, 2016

Author Contributor

c42c3cd got us up to what autoconf does. de56297 alloca exists in stdlib.h in BSD derivs


/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#define HAVE_ALLOCA_H 1
#cmakedefine HAVE_ALLOCA_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍 Test here


/* Define if your assembler supports .cfi_* directives. */
#define HAVE_AS_CFI_PSEUDO_OP 1
#cmakedefine HAVE_AS_CFI_PSEUDO_OP 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

Missing test

This comment has been minimized.

Copy link
@tony

tony Jun 15, 2016

Author Contributor

this flag is only being used on m68k, it won't matter in other places.

introspection via asm(".cfi_startproc\n\t.cfi_endproc"); may still be architecture / assembly dependent. Post on gcc mailing list https://gcc.gnu.org/ml/gcc-patches/2014-04/msg00310.html.

I can keep the current behavior and make a note about it. notes: https://gist.github.com/tony/08c2cbf23eb80a7737ea9e2829992ca7

I don't have a way to test and can't sink more time into it atm.

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 15, 2016

Contributor

only being used on m68k

Great detective work.

current behavior and make a note about i

Sounds great.

have a way to test and can't sink more time into it atm.

No need to test, adding a comment to summarize your investigations would be great 👍

@@ -45,98 +45,98 @@
/* #undef HAVE_AS_SPARC_UA_PCREL */

/* Define if your assembler supports PC relative relocs. */
#define HAVE_AS_X86_PCREL 1
#cmakedefine HAVE_AS_X86_PCREL 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

Missing test

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor

Tested added 👍


/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
#cmakedefine HAVE_DLFCN_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍 Test here


/* Define if __attribute__((visibility("hidden"))) is supported. */
#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1
#cmakedefine HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

Missing test.

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor

Test added 👍


/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
#cmakedefine HAVE_INTTYPES_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍 Test here


/* Define if you have the long double type and it is bigger than a double */
#define HAVE_LONG_DOUBLE 1
#cmakedefine HAVE_LONG_DOUBLE 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍 Test here


/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
#cmakedefine HAVE_MEMCPY 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

Missing test. Could be added before memmove

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor

Test Added 👍


/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
#cmakedefine HAVE_MEMORY_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍 Test here


/* Define to 1 if you have the `mmap' function. */
#define HAVE_MMAP 1
#cmakedefine HAVE_MMAP 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍 Test here


/* Define if mmap with MAP_ANON(YMOUS) works. */
#define HAVE_MMAP_ANON 1
#cmakedefine HAVE_MMAP_ANON 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

Missing test

This comment has been minimized.

Copy link
@tony

tony Jun 15, 2016

Author Contributor

/* Define if mmap of /dev/zero works. */
#define HAVE_MMAP_DEV_ZERO 1
#cmakedefine HAVE_MMAP_DEV_ZERO 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

Missing test

This comment has been minimized.


/* Define if read-only mmap of a plain file works. */
#define HAVE_MMAP_FILE 1
#cmakedefine HAVE_MMAP_FILE 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

Missing test

This comment has been minimized.

Copy link
@tony

tony Jun 15, 2016

Author Contributor

This isn't used in cpython/libffi 2.7 or 3.5. A patch should be made upstream to clean it out


/* Define if .eh_frame sections should be read-only. */
/* #undef HAVE_RO_EH_FRAME */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
#cmakedefine HAVE_STDINT_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍


/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
#cmakedefine HAVE_STDLIB_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍


/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
#cmakedefine HAVE_STRINGS_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍


/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
#cmakedefine HAVE_STRING_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍


/* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_H 1
#cmakedefine HAVE_SYS_MMAN_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍


/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
#cmakedefine HAVE_SYS_STAT_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍


/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
#cmakedefine HAVE_SYS_TYPES_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍


/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
#cmakedefine HAVE_UNISTD_H 1

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 14, 2016

Contributor

👍

int main() {int a = MAP_ANONYMOUS;}" HAVE_MMAP_ANON)


This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor
# libffi specific
exit(0);
}" HAVE_MMAP_DEV_ZERO)


This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor
# libffi specific: Check whether assembler supports .cfi_* directives
@@ -1765,6 +1851,8 @@ endif()

check_c_source_compiles("#include <unistd.h>\n int main() {getpgrp(0);}" GETPGRP_HAVE_ARG)

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor
# libffi specific
@@ -304,6 +304,10 @@ else()
_ctypes/libffi/src/${_libffi_system_dir}/unix64.S
)
endif()

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor
# Note that checks only required by libffi are identified by comment "# libffi specific"
tony added 2 commits Jun 16, 2016
@tony tony force-pushed the tony:freebsd-support branch from a4c25ff to c7af1d2 Jun 17, 2016
@tony
Copy link
Contributor Author

tony commented Jun 17, 2016

@jcfr how's this?

@@ -121,7 +117,7 @@
#define PACKAGE_NAME "libffi"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libffi 3.0.10rc0"
#cmakedefine PACKAGE_STRING "libffi 3.0.10rc0"

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor

Looks like this one got forgotten.

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor

I will take care of it while integrating.

@jcfr
Copy link
Contributor

jcfr commented Jun 17, 2016

@tony Looks good. Outstanding contributions. I will validate on MacOSX and Linux and then integrate.

On the FreeBSD side, are all the tests passing ?

(If you run ctest in the build dir )

@jcfr
Copy link
Contributor

jcfr commented Jun 17, 2016

then integrate.

And while I will probably squash some commits together, I will of course make sure to keep the authorship.

@tony
Copy link
Contributor Author

tony commented Jun 17, 2016

@jcfr Yes, I'm testing through a project I'm integrating it into on both:

  • FreeBSD 11-CURRENT x86_64, CMake 3.5.2, clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) with Python 3.5
  • OS X 10.11.5 x86_64 CMake 3.5.2, Apple LLVM version 7.3.0 (clang-703.0.31) with Python 3.5

before every commit. I'll do ctest now also.

Also, I can squish, unless you got a plan (i'm guessing you'd like cffi-related stuff clumped/ordered together in some fashion)

prevents extensions with REQUIRES LINUX such as linuxaudiodev
being added to FreeBSD builds
@@ -401,7 +401,7 @@ if(NOT HAVE_POSITION_INDEPENDENT_CODE AND NOT WIN32)
endif()

# Useful additional variables that extensions can use.
if(UNIX AND NOT APPLE)
if(CMAKE_SYSTEM MATCHES Linux)

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor

Nice.

Should this other use of UNIX AND NOT APPLE be tweaked too ?

See

if(IS_PY3 AND UNIX AND NOT APPLE)

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor

Note: This commit has been integrated as 06189e5

@tony
Copy link
Contributor Author

tony commented Jun 17, 2016

Preliminary results. I have to read into them more

FreeBSD

99% tests passed, 3 tests failed out of 392

Total Test time (real) = 318.12 sec

The following tests FAILED:
        179 - test_ioctl (Failed)
        191 - test__locale (Failed)
        261 - test_pty (Failed)
Errors while running CTest

out of pty devices, and

191/392 Test: test__locale
Command: "/home/x/study/cmake/python-cmake-buildsystem/build/bin/python" "-Wd" "-3" "-E" "-tt" "/home/x/study/cmake/python-cmake-buildsystem/build/lib/python2.7/test/regrtest.py" "-l" "-v" "test__locale"
Directory: /usr/home/x/study/cmake/python-cmake-buildsystem/build
"test__locale" start time: Jun 16 23:39 CDT
Output:           
----------------------------------------------------------
== CPython 2.7.11 (default, Jun 16 2016, 23:35:26) [GCC 4.2.1 Compatible FreeBSD Clang 3.8.0 (tags/RELEASE_380/final 262564)]
==   FreeBSD-11.0-ALPHA3-amd64-64bit-ELF little-endian
==   /usr/home/x/study/cmake/python-cmake-buildsystem/Python-2.7.11/build/test_python_48641
Testing with flags: sys.flags(debug=0, py3k_warning=1, division_warning=1, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=1, tabcheck=2, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0)
[1/1] test__locale
test_float_parsing (test.test__locale._LocaleTests) ... ok
test_lc_numeric_basic (test.test__locale._LocaleTests) ... ok
test_lc_numeric_localeconv (test.test__locale._LocaleTests) ... FAIL
test_lc_numeric_nl_langinfo (test.test__locale._LocaleTests) ... test test__locale failed -- multiple errors occurred
FAIL              

======================================================================
FAIL: test_lc_numeric_localeconv (test.test__locale._LocaleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/x/study/cmake/python-cmake-buildsystem/build/lib/python2.7/test/test__locale.py", line 101, in test_lc_numeric_localeconv
    if self.numeric_tester('localeconv', formatting[lc], lc, loc):
  File "/home/x/study/cmake/python-cmake-buildsystem/build/lib/python2.7/test/test__locale.py", line 72, in numeric_tester
    used_locale)) 
AssertionError:   !=   (localeconv for thousands_sep; set to fr_FR.UTF-8, using fr_FR.UTF-8)

======================================================================
FAIL: test_lc_numeric_nl_langinfo (test.test__locale._LocaleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/x/study/cmake/python-cmake-buildsystem/build/lib/python2.7/test/test__locale.py", line 86, in test_lc_numeric_nl_langinfo
    if self.numeric_tester('nl_langinfo', nl_langinfo(li), lc, loc):
  File "/home/x/study/cmake/python-cmake-buildsystem/build/lib/python2.7/test/test__locale.py", line 72, in numeric_tester
    used_locale)) 
AssertionError:   !=   (nl_langinfo for thousands_sep; set to fr_FR.UTF-8, using fr_FR.UTF-8)

----------------------------------------------------------------------

OS X

96% tests passed, 17 tests failed out of 392

Total Test time (real) = 256.91 sec

The following tests FAILED:
          6 - test___all__ (Failed)
        100 - test_distutils (Failed)
        143 - test_gdb (Failed)
        159 - test_hashlib (Failed)
        161 - test_hmac (Failed)
        187 - test_lib2to3 (Failed)
        203 - test_md5 (Failed)
        218 - test_multiprocessing (Failed)
        236 - test_pep247 (Failed)
        270 - test_random (Failed)
        288 - test_sha (Failed)
        296 - test_smtplib (Failed)
        318 - test_sundry (Failed)
        326 - test_tarfile (Failed)
        353 - test_unicodedata (Failed)
        361 - test_urllib2_localnet (Failed)
        369 - test_uuid (Failed)
Errors while running CTest

Most of these errors stem from a problem with md5.

203/392 Testing: test_md5
203/392 Test: test_md5
Command: "/Users/me/study/cmake/python-cmake-buildsystem/build/bin/python" "-Wd" "-3" "-E" "-tt" "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/test/regrtest.py" "-l" "-v" "test_md5"
Directory: /Users/me/study/cmake/python-cmake-buildsystem/build
"test_md5" start time: Jun 16 23:40 CDT
Output:
----------------------------------------------------------
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Users/me/study/cmake/python-cmake-buildsystem/build/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
== CPython 2.7.11 (default, Jun 16 2016, 23:31:44) [GCC 4.2.1 Compatible Clang 3.8.0 (tags/RELEASE_380/final)]
==   Darwin-15.5.0-x86_64-i386-64bit little-endian
==   /Users/me/study/cmake/python-cmake-buildsystem/Python-2.7.11/build/test_python_83563
Testing with flags: sys.flags(debug=0, py3k_warning=1, division_warning=1, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=1, tabcheck=2, verbose=0, unicode=0, bytes_warning=0, hash_randomization=0)
[1/1] test_md5
test test_md5 crashed -- <type 'exceptions.ImportError'>: cannot import name md5
Traceback (most recent call last):
@tony
Copy link
Contributor Author

tony commented Jun 17, 2016

OS X: same ctest output for 7812f43 / master on and f6d0108 / freebsd-support with 2.7.11

@@ -114,9 +114,6 @@ PYTHONFRAMEWORKINSTALLDIR=
MACOSX_DEPLOYMENT_TARGET=@CMAKE_OSX_DEPLOYMENT_TARGET@
#export MACOSX_DEPLOYMENT_TARGET

# Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
OTHER_LIBTOOL_OPT=

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor

Commit integrated in ac6c28e

@@ -532,7 +532,7 @@ if(BUILD_SHARED)
target_link_libraries(${targetname} ${python3stub_lib})
endif()

if(IS_PY3 AND UNIX AND NOT APPLE)
if(IS_PY3 AND (LINUX OR BSD))

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor

For now, I will skip this last commit, it would prevent the flag from being added on unix system other that Linux.

A better solution could be to add test similar to what was done in commontk/CTK@52551d4

I will enter a dedicated issue to track this

This comment has been minimized.

Copy link
@jcfr

jcfr Jun 17, 2016

Contributor

For future reference, see #137

@jcfr
Copy link
Contributor

jcfr commented Jun 17, 2016

@tony Remaining commits have been squashed with few tweaks in this topic:

https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/tree/135-improve-libffi-configuration

Look like the test for HAVE_MMAP_FILE is missing.

Additionally, configuring on Ubuntu 15.10 / 5.2.1 20151010, I get the following output associated with the introspection:

-- Performing Test HAVE_MMAP_ANON
-- Performing Test HAVE_MMAP_ANON - Failed

ERROR: This one should be set to 1

The other one are ok:

-- Looking for alloca
-- Looking for alloca - found
-- Looking for memcpy
-- Looking for memcpy - found
  • Great. These correspond to the values that were hardcoded in fficonfig.h
-- Checking whether assembler supports .cfi_* directives
-- Checking whether assembler supports .cfi_* directives - no
  • Great. These correspond to the values that were hardcoded in fficonfig.h
-- Checking whether assembler supports PC relative relocs
-- Checking whether assembler supports PC relative relocs - yes
  • Great. This correspond to the value that was hardcoded in fficonfig.h
-- Performing Test HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
-- Performing Test HAVE_HIDDEN_VISIBILITY_ATTRIBUTE - Success
  • Great. This correspond to the value that was hardcoded in fficonfig.h
-- Performing Test HAVE_MMAP_DEV_ZERO
-- Performing Test HAVE_MMAP_DEV_ZERO - Success
  • Great. This correspond to the value that was hardcoded in fficonfig.h
-- Performing Test SETPGRP_HAVE_ARG
-- Performing Test SETPGRP_HAVE_ARG - Failed
  • Great. This correspond to the value that is set in pyconfig.h after using the autoconf based system.
@jcfr
Copy link
Contributor

jcfr commented Jun 17, 2016

re: Performing Test HAVE_MMAP_ANON - Failed

Found the issue, there was a typo

#ifndef MAPANONYMOUS -> #ifndef MAP_ANONYMOUS

-- Performing Test HAVE_MMAP_ANON
-- Performing Test HAVE_MMAP_ANON - Success
@jcfr
Copy link
Contributor

jcfr commented Jun 17, 2016

Look like I was wrong, this one is also miconfigured:

Checking whether assembler supports .cfi_* directives - no
@tony
Copy link
Contributor Author

tony commented Jun 17, 2016

Checking whether assembler supports .cfi_* directives - no

Are you experiencing the same problem I have in the gist? https://gist.github.com/tony/08c2cbf23eb80a7737ea9e2829992ca7

That thing is only on m68k, no?

According to wikipedia, the last time a chip was released with that arch was 1994. https://en.wikipedia.org/wiki/Motorola_68060. Sega Genesis used it. :/ I think we can get rid of that.

What do you think?

@jcfr
Copy link
Contributor

jcfr commented Jun 17, 2016

re: Checking whether assembler supports .cfi_* directives - no

Fixed in f9a0091

re: experiencing the same problem I have in the gist

Didn't get a chance to look at the details yet. I will make a note when I will wirk again on the cross-compilation support.

re: That thing is only on m68k, no?

I am not sure.

Look like the test for HAVE_MMAP_FILE is missing.

Fixed in ccdb7e7

next step

There are still some missing tests ... basically the one in the diff here: 86b5d80

@jcfr
Copy link
Contributor

jcfr commented Jun 17, 2016

There are still some missing tests

Test placeholders have been added in 6e21604

@jcfr
Copy link
Contributor

jcfr commented Jun 17, 2016

@tony Thanks again for your work on this 👍

Topic has been reorganized and integrated as 846ae61

Additional issues have also been entered as #137 #138

@jcfr jcfr closed this Jun 17, 2016
@tony tony deleted the tony:freebsd-support branch Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.