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

Error compiling on OSX #24

Open
Juke34 opened this issue Oct 12, 2021 · 2 comments
Open

Error compiling on OSX #24

Juke34 opened this issue Oct 12, 2021 · 2 comments

Comments

@Juke34
Copy link
Contributor

Juke34 commented Oct 12, 2021

building info:

cmake -DSTANDALONE=ON ..
-- +--------------------------------------------------------------------+
-- |                          PfTools   v3.2.10                          |
-- +--------------------------------------------------------------------+
-- |     (C) Copyright SIB Swiss Institute of Bioinformatics            |
-- |         Thierry Schuepbach ([email protected])                  |
-- |                                                                    |
-- |     PfTools is available from                                      |
-- |         https://github.com/sib-swiss/pftools3                      |
-- |     under the GPL v2. See LICENSE.                                 |
-- |                                                                    |
-- +--------------------------------------------------------------------+
-- Compilation on architecture x86_64.
-- testing flag -msse4.1...
-- Add -std=c99 to C compiler options
-- Add SSE2 to C compiler options
-- Perl found - full test suite usable
-- libPCRE will be built in /Users/jacda119/git/pftools3/build/libPCRE
-- Building test suite for pfsearch in /Users/jacda119/git/pftools3/Tests
-- Check Perl script syntax
       compare_2_profiles.pl
           - syntax OK
       fasta_to_fastq.pl
           - syntax OK
       make_iupac_cmp.pl
           - syntax OK
       ps_scan.pl
           - syntax OK
       scramble_fasta.pl
           - syntax OK
       sort_fasta.pl
           - syntax OK
       split_profile_file.pl
           - syntax OK
-- 
-- PfTools Software Suite configuration summary:
-- 
--   System name ......................: Darwin
--   Build type .......................: Release
-- 
--   Integer format ...................: 16 bits
-- 
--   Install prefix .................. : /usr/local
--   C compiler ...................... : /Users/jacda119/miniconda3/envs/pftools/bin/x86_64-apple-darwin13.4.0-clang
--   Fortran compiler ................ : /Users/jacda119/miniconda3/envs/pftools/bin/x86_64-apple-darwin13.4.0-gfortran
--   C compiler flags ................ : -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/jacda119/miniconda3/envs/pftools/include -std=c99 -msse2 -O3 -DNDEBUG
--   C compiler SSE2 flag. ........... : -msse2
--   C compiler SSE 4.1 flag.......... : -msse4.1
--   Fortran compiler flags .......... : -march=core2 -mtune=haswell -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -isystem /Users/jacda119/miniconda3/envs/pftools/include -O3 -DNDEBUG -O3
-- 
--   Use file memory mapping ..........: ON
--   Use thread affinity setting ......: OFF
-- 
--   Build shared libs ............... : OFF
--   Build static libs ............... : OFF
--   Build static executables......... : ON
-- 
--   Link with pcre .................. : Internaly built
-- 
!! CPU thread affinity is disabled, hence performance penalty may apply on many-core architecture.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jacda119/git/pftools3/build

compiling with make:

[ 33%] Built target SEQUENCES_EXTRA
[ 34%] Building C object src/C/utils/CMakeFiles/SEQUENCES.dir/ReadSequence.c.o
/Users/jacda119/git/pftools3/src/C/utils/ReadSequence.c:213:36: error: no member named 'st_mtim' in 'struct stat'
        Info->LastModification = FileStat.st_mtim;
                                 ~~~~~~~~ ^
/Users/jacda119/git/pftools3/src/C/utils/ReadSequence.c:423:36: error: no member named 'st_mtim' in 'struct stat'
        Info->LastModification = FileStat.st_mtim;
                                 ~~~~~~~~ ^
/Users/jacda119/git/pftools3/src/C/utils/ReadSequence.c:571:36: error: no member named 'st_mtim' in 'struct stat'
        Info->LastModification = FileStat.st_mtim;
                                 ~~~~~~~~ ^
/Users/jacda119/git/pftools3/src/C/utils/ReadSequence.c:631:41: error: no member named 'st_mtim' in 'struct stat'
        if (st.st_size != Info->FileSize || st.st_mtim.tv_nsec != Info->LastModification.tv_nsec ||
                                            ~~ ^
/Users/jacda119/git/pftools3/src/C/utils/ReadSequence.c:632:6: error: no member named 'st_mtim' in 'struct stat'
                st.st_mtim.tv_sec != Info->LastModification.tv_sec) {
                ~~ ^
5 errors generated.
make[2]: *** [src/C/utils/CMakeFiles/SEQUENCES.dir/ReadSequence.c.o] Error 1
make[1]: *** [src/C/utils/CMakeFiles/SEQUENCES.dir/all] Error 2
make: *** [all] Error 2
@Juke34
Copy link
Contributor Author

Juke34 commented Oct 12, 2021

adding

#if defined(__APPLE__) || defined(__NetBSD__) 
#define st_atim st_atimespec
#define st_ctim st_ctimespec
#define st_mtim st_mtimespec
#endif

in the header of ReadSequence.c solve the problem but now I have another problem

Consolidate compiler generated dependencies of target SYSTEM
[ 36%] Building C object src/C/utils/CMakeFiles/SYSTEM.dir/system.c.o
In file included from /Users/jacda119/git/pftools3/src/C/utils/system.c:11:
/Users/jacda119/git/pftools3/src/C/include/system.h:90:32: error: unknown type name 'cpu_set_t'
typedef struct Affinity_Mask { cpu_set_t data; } Affinity_Mask_t;
                               ^
1 error generated.
make[2]: *** [src/C/utils/CMakeFiles/SYSTEM.dir/system.c.o] Error 1
make[1]: *** [src/C/utils/CMakeFiles/SYSTEM.dir/all] Error 2
make: *** [all] Error 2

@schoopy
Copy link

schoopy commented Oct 12, 2021 via email

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

2 participants