I tried to build affxparser
an R package on my book, M1 MacOS 12.3.1, with R 4.1.3 and gcc 11.2.0.
However the building runs error. (as the limit of characters, i haven't put few beginning lines, to see more details can click here
g -11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -Ifusion/calvin_files/array/src -Ifusion/calvin_files/data/src -Ifusion/calvin_files/exception/src -Ifusion/calvin_files/fusion/src -Ifusion/calvin_files/fusion/src/GCOSAdapter -Ifusion/calvin_files/fusion/src/CalvinAdapter -Ifusion/calvin_files/parameter/src -Ifusion/calvin_files/parsers/src -Ifusion/calvin_files/portability/src -Ifusion/calvin_files/template/src -Ifusion/calvin_files/utils/src -Ifusion/calvin_files/writers/src -Ifusion/file -Ifusion/file/TsvFile -Ifusion/portability -Ifusion/util -Ifusion -D_USE_MEM_MAPPING_ -I/opt/R/arm64/include -fPIC -mtune=native -g -O2 -Wall -pedantic -Wconversion -Wno-sign-compare -O0 -c fusion/calvin_files/fusion/src/FusionCELData.cpp -o fusion/calvin_files/fusion/src/FusionCELData.o
In file included from fusion/file/CELFileData.h:33,
from fusion/calvin_files/fusion/src/GCOSAdapter/GCOSCELDataAdapter.h:30,
from fusion/calvin_files/fusion/src/FusionCELData.cpp:24:
fusion/file/FileIO.h: In function 'uint16_t affy_swap16(uint16_t)':
fusion/file/FileIO.h:67:31: warning: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion]
67 | return ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from fusion/calvin_files/fusion/src/GCOSAdapter/GCOSCELDataAdapter.h:30,
from fusion/calvin_files/fusion/src/FusionCELData.cpp:24:
fusion/file/CELFileData.h: At global scope:
fusion/file/CELFileData.h:91:23: warning: malformed '#pragma options align={mac68k|power|reset}', ignoring [-Wpragmas]
91 | #pragma options align=packed
| ^~~~~~
fusion/file/CELFileData.h:127:23: error: too many '#pragma options align=reset'
127 | #pragma options align=reset
| ^~~~~
fusion/calvin_files/fusion/src/FusionCELData.cpp: In member function 'unsigned int affymetrix_fusion_io::FusionCELData::GetFileSize()':
fusion/calvin_files/fusion/src/FusionCELData.cpp:492:22: warning: conversion from 'int64_t' {aka 'long long int'} to 'unsigned int' may change value [-Wconversion]
492 | return Fs::fileSize(filename);
| ~~~~~~~~~~~~^~~~~~~~~~
make: *** [fusion/calvin_files/fusion/src/FusionCELData.o] Error 1
ERROR: compilation failed for package ‘affxparser’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/affxparser’
Besides, i have installed some other packages which also run error. According to some information, i wrote some codes in bash_profile
and Makevars
in command line.
I add codes below in bash_profile
alias gcc='gcc-11'
alias cc='gcc-11'
alias g ='g -11'
alias c ='c -11'
I create a Makevars which is
VER=-11
CC=gcc$(VER)
CXX=g $(VER)
CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
FLIBS=-L/usr/local/Cellar/gcc/11.2.0/lib/gcc/11
I thought the make: ***[fusion/calvin_files/fusion/src/FusionCELData.o] Error 1
might be the problem, but I don't know how to fix it. Hope for anyone answer.
CodePudding user response:
I fix this problem with hiding away those codes in my Makevars
and bash_profile
showed above, which turn my profiler into default clang to profile codes in affxparser
. Finally, finish this.