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

Plink 1.9 fails to build with GCC 6 #28

Closed
daissi opened this issue Jan 23, 2016 · 8 comments
Closed

Plink 1.9 fails to build with GCC 6 #28

daissi opened this issue Jan 23, 2016 · 8 comments

Comments

@daissi
Copy link
Contributor

daissi commented Jan 23, 2016

Hi,
GCC 6 has not been released yet, but it's expected that GCC 6 will become the default compiler for Debian Stretch (next release). As reported by Martin Michlmayr, plink 1.9 fails to build [1] with GCC 6:

sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
...
make[2]: Entering directory '/<>'
g++ -Wall -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro plink.c plink_assoc.c plink_calc.c plink_cluster.c plink_cnv.c plink_common.c plink_data.c plink_dosage.c plink_family.c plink_filter.c plink_glm.c plink_help.c plink_homozyg.c plink_lasso.c plink_ld.c plink_matrix.c plink_misc.c plink_perm.c plink_rserve.c plink_set.c plink_stats.c SFMT.c dcdflib.c pigz.c yarn.c Rconnection.cc hfile.c bgzf.c -o plink -llapack -lcblas -latlas -lm -lpthread -ldl -lz
In file included from plink.c:19:0:
plink_common.h:62:19: error: expected unqualified-id before 'long'
#define int64_t long long
^

plink_common.h:62:19: error: expected ';' before 'long'
plink_common.h:62:24: error: declaration does not declare anything [-fpermissive]
#define int64_t long long
^

plink_common.h:61:20: error: expected unqualified-id before 'unsigned'
#define uint64_t unsigned long long
^

plink_common.h:61:20: error: expected ';' before 'unsigned'
plink_common.h:61:34: error: declaration does not declare anything [-fpermissive]
#define uint64_t unsigned long long
^

You can see the full build log here [2].

Best regards,
Dylan

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811910
[2] https://launchpadlibrarian.net/233688889/buildlog_ubuntu-xenial-amd64.plink1.9_1.90~b3b-150117-1_BUILDING.txt.gz

@chrchang
Copy link
Owner

I checked in a change which might fix this problem; let me know if the build still fails.

@daissi
Copy link
Contributor Author

daissi commented Jan 25, 2016

Hi,
The build still fails. GCC6_build_log.txt

Best,
Dylan

@chrchang
Copy link
Owner

I've made another patch attempt, but I could really use some documentation on what GCC 6 changed w.r.t. uint64_t and int64_t...

@daissi
Copy link
Contributor Author

daissi commented Feb 3, 2016

I performed others tests for building plink1.9 with GCC6.
Plink1.9 (commit 0475ac) builds successfully with GCC6 if we add the argument "-std=c++98" to the compiler but it fails with "-std=c++11" or "-std=c++14" (which is the default c++ standard since GCC6).
Since your commit 33f794, plink1.9 builds successfully whatever the c++ std defines.

@chrchang
Copy link
Owner

chrchang commented Feb 3, 2016

Okay, good to know that it's a C++11 issue, and that the codebase is now valid gcc C++11.

@chrchang chrchang closed this as completed Feb 3, 2016
@daissi
Copy link
Contributor Author

daissi commented Aug 30, 2016

Hi,
The problem reappears. GCC 6 is now the default builder in Debian unstable and the last plink1.9 (beta 3.40, 16 Aug) fails to build for some architectures (including i386) except *amd64 [1]. Please find bellow the errors and the full log [2]:

...
In file included from plink_rserve.c:6:0:
plink_common.h:115:24: error: expected unqualified-id before 'long'
       #define intptr_t long
                        ^
plink_common.h:115:24: error: expected ';' before 'long'
plink_common.h:115:24: error: declaration does not declare anything [-fpermissive]
plink_common.h:112:25: error: expected unqualified-id before 'unsigned'
       #define uintptr_t unsigned long
                         ^
plink_common.h:112:25: error: expected ';' before 'unsigned'
plink_common.h:112:34: error: declaration does not declare anything [-fpermissive]
       #define uintptr_t unsigned long
...

Best regards,
Dylan

[1] https://buildd.debian.org/status/package.php?p=plink1.9
[2] https://buildd.debian.org/status/fetch.php?pkg=plink1.9&arch=i386&ver=1.90%7Eb3.40-160816-1&stamp=1472371290

@chrchang
Copy link
Owner

Okay, I've posted an attempt at a fix; let me know if this still fails.

@chrchang chrchang reopened this Aug 30, 2016
@daissi
Copy link
Contributor Author

daissi commented Aug 30, 2016

It is now ok for i386 build.

Thanks

@daissi daissi closed this as completed Aug 30, 2016
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