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

MinGW64 (Git Bash) fails to parse ./configure generated directory names #207

Open
softsteel opened this issue Mar 7, 2023 · 0 comments
Open

Comments

@softsteel
Copy link

Hello,

I was able to compile libck on Windows after making the following changes:
configure:35

P_PWD=`pwd`
P_PWD=`pwd -W`

and src/Makefile.in:6

SDIR=$(SRC_DIR)/src
INCLUDE_DIR=$(SRC_DIR)/include
SDIR=.
INCLUDE_DIR=../include

I used Git Bash to run ./configure
& Nixman's x86_64-12.2.0-release-win32-seh-msvcrt-rt_v10-rev2.7z to mingw32-make in the root directory.

https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev2/x86_64-12.2.0-release-win32-seh-msvcrt-rt_v10-rev2.7z

$ ./configure
Detecting operating system.......success [mingw64]
Detecting machine architecture...success [x86_64]
Finding dirname command..........success [/usr/bin/dirname]
Determining build directory......success [/c/Users/.../ck_]
Finding gzip tool................success [/usr/bin/gzip]
Finding suitable compiler........success [/c/nixman/mingw64/bin/gcc]
Finding suitable archiver........success [/c/nixman/mingw64/bin/ar]
Detecting VMA bits...............success [48]
Checking header file usability...success [stdbool.h]
Checking header file usability...success [stddef.h]
Checking header file usability...success [stdint.h]
Checking header file usability...success [string.h]
Detecting git SHA................success [50299b7]
Generating header files..........success
Generating build files...........success

           VERSION = 0.7.1
           GIT_SHA = 50299b7
         BUILD_DIR = /c/Users/.../ck_
           SRC_DIR = /c/Users/.../ck_
            SYSTEM = mingw64
           PROFILE = x86_64
                AR = /c/nixman/mingw64/bin/ar
                CC = /c/nixman/mingw64/bin/gcc
          COMPILER = mingw64
            CFLAGS = -D_BSD_SOURCE -D_DEFAULT_SOURCE -std=gnu99 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -fstrict-aliasing -O2 -pipe -Wno-parentheses  -fPIC -D_XOPEN_SOURCE=600
    PTHREAD_CFLAGS = -pthread
                LD = /c/nixman/mingw64/bin/gcc
            LDNAME = libck.so
    LDNAME_VERSION = libck.so.0.7.1
      LDNAME_MAJOR = libck.so.0
           LDFLAGS = -Wl,-soname,libck.so.0 -m64 -mthreads  -shared -fPIC
        STATIC_LIB = 0
              GZIP = /usr/bin/gzip -c
             CORES = 2
      POINTER_PACK = CK_MD_POINTER_PACK_DISABLE
      PPC32_LWSYNC = CK_MD_PPC32_LWSYNC_DISABLE
          VMA_BITS = 48
      MEMORY_MODEL = CK_MD_TSO
               RTM = CK_MD_RTM_DISABLE
               LSE = CK_MD_LSE_DISABLE
               SSE = CK_MD_SSE_ENABLE

Headers will be installed in /usr/local/include
Libraries will be installed in /usr/local/lib
Documentation will be installed in /usr/local/share/man

$ mingw32-make.exe
C:/nixman/mingw64/bin/mingw32-make -C doc all || exit
mingw32-make[1]: Entering directory 'C:/Users/.../ck_/doc'
for target in CK_ARRAY_FOREACH ck_array_buffer ck_array_commit ck_array_deinit ck_array_init ck_array_initialized ck_array_length ck_array_put ck_array_put_unique ck_array_remove ck_array_deinit ck_brlock ck_ht_count ck_ht_destroy ck_ht_gc ck_ht_get_spmc ck_ht_grow_spmc ck_ht_hash ck_ht_hash_direct ck_ht_init ck_ht_put_spmc ck_ht_remove_spmc ck_ht_reset_spmc ck_ht_reset_size_spmc ck_ht_set_spmc ck_ht_entry_empty ck_ht_entry_key ck_ht_entry_key_direct ck_ht_entry_key_length ck_ht_entry_key_set ck_ht_entry_key_set_direct ck_ht_entry_set ck_ht_entry_set_direct ck_ht_entry_value_direct ck_ht_entry_value ck_ht_iterator_init ck_ht_next ck_ht_stat ck_bitmap_init ck_bitmap_reset ck_bitmap_set ck_bitmap_bts ck_bitmap_test ck_bitmap_base ck_bitmap_union ck_bitmap_size ck_bitmap_clear ck_bitmap_bits ck_bitmap_buffer ck_bitmap_next ck_bitmap_iterator_init ck_elide ck_epoch_barrier ck_epoch_begin ck_epoch_call ck_epoch_end ck_epoch_init ck_epoch_poll ck_epoch_recycle ck_epoch_register ck_epoch_reclaim ck_epoch_synchronize ck_epoch_unregister ck_hs_gc ck_hs_init ck_hs_destroy CK_HS_HASH ck_hs_apply ck_hs_iterator_init ck_hs_next ck_hs_get ck_hs_put ck_hs_put_unique ck_hs_set ck_hs_fas ck_hs_remove ck_hs_move ck_hs_grow ck_hs_rebuild ck_hs_count ck_hs_reset ck_hs_reset_size ck_hs_stat ck_rhs_gc ck_rhs_init ck_rhs_destroy CK_RHS_HASH ck_rhs_apply ck_rhs_iterator_init ck_rhs_next ck_rhs_get ck_rhs_put ck_rhs_put_unique ck_rhs_set ck_rhs_fas ck_rhs_remove ck_rhs_move ck_rhs_grow ck_rhs_rebuild ck_rhs_count ck_rhs_reset ck_rhs_reset_size ck_rhs_stat ck_rwcohort CK_RWCOHORT_INIT CK_RWCOHORT_INSTANCE CK_RWCOHORT_PROTOTYPE CK_RWCOHORT_READ_LOCK CK_RWCOHORT_READ_UNLOCK CK_RWCOHORT_WRITE_LOCK CK_RWCOHORT_WRITE_UNLOCK ck_cohort CK_COHORT_PROTOTYPE CK_COHORT_TRYLOCK_PROTOTYPE CK_COHORT_INSTANCE CK_COHORT_INIT CK_COHORT_LOCK CK_COHORT_UNLOCK CK_COHORT_TRYLOCK ck_pr ck_pr_fence_acquire ck_pr_fence_release ck_pr_barrier ck_pr_fas ck_pr_fence_atomic ck_pr_fence_atomic_load ck_pr_fence_atomic_store ck_pr_fence_load ck_pr_fence_load_atomic ck_pr_fence_load_store ck_pr_fence_load_depends ck_pr_fence_memory ck_pr_fence_store ck_pr_fence_store_atomic ck_pr_fence_store_load ck_pr_stall ck_pr_faa ck_pr_inc ck_pr_dec ck_pr_not ck_pr_neg ck_pr_add ck_pr_sub ck_pr_and ck_pr_xor ck_pr_or ck_pr_cas ck_pr_bts ck_pr_btc ck_pr_btr ck_pr_store ck_pr_load ck_pr_rtm ck_queue ck_ring_init ck_ring_dequeue_spmc ck_ring_enqueue_spmc ck_ring_enqueue_spmc_size ck_ring_trydequeue_spmc ck_ring_dequeue_spsc ck_ring_enqueue_spsc ck_ring_enqueue_spsc_size ck_ring_size ck_ring_capacity ck_tflock ck_rwlock ck_pflock ck_swlock ck_sequence ck_spinlock; do                           \
        /usr/bin/gzip -c /c/Users/.../ck_/doc/$target > /c/Users/.../ck_/doc/$target.3.gz; \
done
mingw32-make[1]: Leaving directory 'C:/Users/.../ck_/doc'
---[ Manual pages are ready for installation.
C:/nixman/mingw64/bin/mingw32-make -C src all || exit
mingw32-make[1]: Entering directory 'C:/Users/.../ck_/src'
Makefile:3: /c/Users/.../ck_/build/ck.build: No such file or directory
mingw32-make[1]: *** No rule to make target '/c/Users/.../ck_/build/ck.build'.  Stop.
mingw32-make[1]: Leaving directory 'C:/Users/.../ck_/src'
mingw32-make: *** [Makefile:17: all] Error 2

After applying pwd -W patch, (and ./configure)

$ mingw32-make.exe
C:/nixman/mingw64/bin/mingw32-make -C doc all || exit
mingw32-make[1]: Entering directory 'C:/Users/.../ck_/doc'
for target in CK_ARRAY_FOREACH ck_array_buffer ck_array_commit ck_array_deinit ck_array_init ck_array_initialized ck_array_length ck_array_put ck_array_put_unique ck_array_remove ck_array_deinit ck_brlock ck_ht_count ck_ht_destroy ck_ht_gc ck_ht_get_spmc ck_ht_grow_spmc ck_ht_hash ck_ht_hash_direct ck_ht_init ck_ht_put_spmc ck_ht_remove_spmc ck_ht_reset_spmc ck_ht_reset_size_spmc ck_ht_set_spmc ck_ht_entry_empty ck_ht_entry_key ck_ht_entry_key_direct ck_ht_entry_key_length ck_ht_entry_key_set ck_ht_entry_key_set_direct ck_ht_entry_set ck_ht_entry_set_direct ck_ht_entry_value_direct ck_ht_entry_value ck_ht_iterator_init ck_ht_next ck_ht_stat ck_bitmap_init ck_bitmap_reset ck_bitmap_set ck_bitmap_bts ck_bitmap_test ck_bitmap_base ck_bitmap_union ck_bitmap_size ck_bitmap_clear ck_bitmap_bits ck_bitmap_buffer ck_bitmap_next ck_bitmap_iterator_init ck_elide ck_epoch_barrier ck_epoch_begin ck_epoch_call ck_epoch_end ck_epoch_init ck_epoch_poll ck_epoch_recycle ck_epoch_register ck_epoch_reclaim ck_epoch_synchronize ck_epoch_unregister ck_hs_gc ck_hs_init ck_hs_destroy CK_HS_HASH ck_hs_apply ck_hs_iterator_init ck_hs_next ck_hs_get ck_hs_put ck_hs_put_unique ck_hs_set ck_hs_fas ck_hs_remove ck_hs_move ck_hs_grow ck_hs_rebuild ck_hs_count ck_hs_reset ck_hs_reset_size ck_hs_stat ck_rhs_gc ck_rhs_init ck_rhs_destroy CK_RHS_HASH ck_rhs_apply ck_rhs_iterator_init ck_rhs_next ck_rhs_get ck_rhs_put ck_rhs_put_unique ck_rhs_set ck_rhs_fas ck_rhs_remove ck_rhs_move ck_rhs_grow ck_rhs_rebuild ck_rhs_count ck_rhs_reset ck_rhs_reset_size ck_rhs_stat ck_rwcohort CK_RWCOHORT_INIT CK_RWCOHORT_INSTANCE CK_RWCOHORT_PROTOTYPE CK_RWCOHORT_READ_LOCK CK_RWCOHORT_READ_UNLOCK CK_RWCOHORT_WRITE_LOCK CK_RWCOHORT_WRITE_UNLOCK ck_cohort CK_COHORT_PROTOTYPE CK_COHORT_TRYLOCK_PROTOTYPE CK_COHORT_INSTANCE CK_COHORT_INIT CK_COHORT_LOCK CK_COHORT_UNLOCK CK_COHORT_TRYLOCK ck_pr ck_pr_fence_acquire ck_pr_fence_release ck_pr_barrier ck_pr_fas ck_pr_fence_atomic ck_pr_fence_atomic_load ck_pr_fence_atomic_store ck_pr_fence_load ck_pr_fence_load_atomic ck_pr_fence_load_store ck_pr_fence_load_depends ck_pr_fence_memory ck_pr_fence_store ck_pr_fence_store_atomic ck_pr_fence_store_load ck_pr_stall ck_pr_faa ck_pr_inc ck_pr_dec ck_pr_not ck_pr_neg ck_pr_add ck_pr_sub ck_pr_and ck_pr_xor ck_pr_or ck_pr_cas ck_pr_bts ck_pr_btc ck_pr_btr ck_pr_store ck_pr_load ck_pr_rtm ck_queue ck_ring_init ck_ring_dequeue_spmc ck_ring_enqueue_spmc ck_ring_enqueue_spmc_size ck_ring_trydequeue_spmc ck_ring_dequeue_spsc ck_ring_enqueue_spsc ck_ring_enqueue_spsc_size ck_ring_size ck_ring_capacity ck_tflock ck_rwlock ck_pflock ck_swlock ck_sequence ck_spinlock; do                           \
        /usr/bin/gzip -c /c/Users/.../ck_/doc/$target > C:/Users/.../ck_/doc/$target.3.gz; \
done
mingw32-make[1]: Leaving directory 'C:/Users/.../ck_/doc'
---[ Manual pages are ready for installation.
C:/nixman/mingw64/bin/mingw32-make -C src all || exit
mingw32-make[1]: Entering directory 'C:/Users/.../ck_/src'
mingw32-make[1]: *** No rule to make target '/c/Users/.../ck_/src/ck_barrier_centralized.c', needed by 'ck_barrier_centralized.o'.  Stop.
mingw32-make[1]: Leaving directory 'C:/Users/.../ck_/src'
mingw32-make: *** [Makefile:17: all] Error 2

After the src/Makefile.in patch, (and ./configure)

...
---[ Concurrency Kit has built successfully. You may now "make install".

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant