Closed duyhoang-astro closed 5 months ago
Could you try using the prefix option only when installing?
On 03/30/2016 05:46 PM, Duy Hoang wrote:
Hi maaijke,
I am trying to install RMextract to a directory $HOME/lofar/RMextract (as I don't have root account), but I got this error:
python setup.py build --add-lofar-utils --prefix $HOME/lofar/RMextract usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help
error: option --prefix not recognized
Do you have idea how to fix this?
Thanks, Duy
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/maaijke/RMextract/issues/1
Thanks for the quick reply. I have tried the build command without --prefix. It seems to work, but has problem with gcc. Below is the output:
python setup.py build --add-lofar-utils running build running build_py running build_ext building '_EMM_Model' extension gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c EMM/EMM_Model.cc -o build/temp.linux-x86_64-2.7/EMM/EMM_Model.o EMM/EMM_Model.cc: In constructor ‘WMM_Model::WMMModel(const char, float, float, float, float)’: EMM/EMM_Model.cc:33:8: warning: unused variable ‘filenameSV’ [-Wunused-variable] char filenameSV[256]; ^ EMM/EMM_Model.cc: In member function ‘void WMM_Model::setEM()’: EMM/EMM_Model.cc:59:9: warning: unused variable ‘index’ [-Wunused-variable] int index; ^ EMM/EMM_Model.cc: In constructor ‘WMM_Model::WMM_Model()’: EMM/EMM_Model.cc:23:29: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] MagneticModels[i]=NULL; ^ EMM/EMM_Model.cc:22:20: note: containing loop for(int i = 0; i < epochs + 1; i++) ^ EMM/EMM_Model.cc: In constructor ‘WMM_Model::WMMModel(const char, float, float, float, float)’: EMM/EMM_Model.cc:30:29: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] MagneticModels[i]=NULL; ^ EMM/EMM_Model.cc:29:20: note: containing loop for(int i = 0; i < epochs + 1; i++) ^ EMM/EMM_Model.cc: In destructor ‘WMM_Model::~WMM_Model()’: EMM/EMM_Model.cc:13:25: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] if (MagneticModels[i]){ ^ EMM/EMM_Model.cc:12:20: note: containing loop for(int i = 0; i < epochs + 1; i++) ^ EMM/EMM_Model.cc:13:25: warning: array subscript is above array bounds [-Warray-bounds] if (MagneticModels[i]){ ^ EMM/EMM_Model.cc:15:23: warning: array subscript is above array bounds [-Warray-bounds] MagneticModels[i]=NULL; ^ gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c EMM/GeomagnetismLibrary.c -o build/temp.linux-x86_64-2.7/EMM/GeomagnetismLibrary.o EMM/GeomagnetismLibrary.c: In function ‘MAG_GetUserInput’: EMM/GeomagnetismLibrary.c:1065:24: error: format not a string literal and no format arguments [-Werror=format-security] printf(Error_Message); ^ EMM/GeomagnetismLibrary.c:1089:28: error: format not a string literal and no format arguments [-Werror=format-security] printf(Error_Message); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_robustReadMagneticModel_Large’: EMM/GeomagnetismLibrary.c:424:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(line, MAXLINELENGTH, MODELFILE); ^ EMM/GeomagnetismLibrary.c:436:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(line, MAXLINELENGTH, MODELFILE); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_robustReadMagModels’: EMM/GeomagnetismLibrary.c:472:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(line, MAXLINELENGTH, MODELFILE); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_GeomagIntroduction_EMM’: EMM/GeomagnetismLibrary.c:600:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unusedresult [-Wunused-result] scanf("%c%[^\n]", &ans); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_GeomagIntroduction_WMM’: EMM/GeomagnetismLibrary.c:676:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unusedresult [-Wunused-result] scanf("%c%[^\n]", &help); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_GetUserGrid’: EMM/GeomagnetismLibrary.c:768:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:772:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:776:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:780:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:784:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:788:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:796:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:800:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:804:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:810:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:814:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:818:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:823:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:827:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:831:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:836:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:841:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:848:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_GetUserInput’: EMM/GeomagnetismLibrary.c:913:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:954:17: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:964:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1005:17: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1016:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1049:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1067:17: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1092:21: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1102:13: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1117:25: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_Warnings’: EMM/GeomagnetismLibrary.c:1403:13: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(ans, 20, stdin); ^ EMM/GeomagnetismLibrary.c:1409:13: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(ans, 20, stdin); ^ EMM/GeomagnetismLibrary.c:1416:17: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(ans, 20, stdin); ^ EMM/GeomagnetismLibrary.c:1450:17: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(ans, 20, stdin); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_readMagneticModel’: EMM/GeomagnetismLibrary.c:1974:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str, 80, MAG_COF_File); ^ EMM/GeomagnetismLibrary.c:1979:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str, 80, MAG_COF_File); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_readMagneticModel_Large’: EMM/GeomagnetismLibrary.c:2044:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str, 80, MAG_COF_File); ^ EMM/GeomagnetismLibrary.c:2052:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str, 80, MAG_COF_File); ^ EMM/GeomagnetismLibrary.c:2054:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str2, 80, MAG_COFSV_File); ^ EMM/GeomagnetismLibrary.c:2067:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str, 80, MAG_COF_File); ^ cc1: some warnings being treated as errors error: command 'gcc' failed with exit status 1
Oh wow, I haven't seen this one before, could you give me your system specifications?
On 03/30/2016 07:05 PM, Duy Hoang wrote:
Thanks for the quick reply. I have tried the build command without --prefix. It seems to work, but has problem with gcc. Below is the output:
python setup.py build --add-lofar-utils running build running build_py running build_ext building '_EMM_Model' extension gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c EMM/EMM_Model.cc -o build/temp.linux-x86_64-2.7/EMM/EMM_Model.o EMM/EMM_Model.cc: In constructor ‘WMM_Model::WMM_Model(const char/, float, float, float, float)’: EMM/EMM_Model.cc:33:8: warning: unused variable ‘filenameSV’ [-Wunused-variable] char filenameSV[256]; ^ EMM/EMM_Model.cc: In member function ‘void WMM_Model::setEM()’: EMM/EMM_Model.cc:59:9: warning: unused variable ‘index’ [-Wunused-variable] int index; ^ EMM/EMM_Model.cc: In constructor ‘WMM_Model::WMM_Model()’: EMM/EMM_Model.cc:23:29: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] MagneticModels[i]=NULL; ^ EMM/EMM_Model.cc:22:20: note: containing loop for(int i = 0; i < epochs + 1; i++) ^ EMM/EMM_Model.cc: In constructor ‘WMM_Model::WMM_Model(const char/, float, float, float, float)’: EMM/EMM_Model.cc:30:29: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] MagneticModels[i]=NULL; ^ EMM/EMM_Model.cc:29:20: note: containing loop for(int i = 0; i < epochs + 1; i++) ^ EMM/EMM_Model.cc: In destructor ‘WMM_Model::~WMM_Model()’: EMM/EMM_Model.cc:13:25: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] if (MagneticModels[i]){ ^ EMM/EMM_Model.cc:12:20: note: containing loop for(int i = 0; i < epochs + 1; i++) ^ EMM/EMM_Model.cc:13:25: warning: array subscript is above array bounds [-Warray-bounds] if (MagneticModels[i]){ ^ EMM/EMM_Model.cc:15:23: warning: array subscript is above array bounds [-Warray-bounds] MagneticModels[i]=NULL; ^ gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c EMM/GeomagnetismLibrary.c -o build/temp.linux-x86_64-2.7/EMM/GeomagnetismLibrary.o EMM/GeomagnetismLibrary.c: In function ‘MAG_GetUserInput’: EMM/GeomagnetismLibrary.c:1065:24: error: format not a string literal and no format arguments [-Werror=format-security] printf(Error_Message); ^ EMM/GeomagnetismLibrary.c:1089:28: error: format not a string literal and no format arguments [-Werror=format-security] printf(Error_Message); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_robustReadMagneticModel_Large’: EMM/GeomagnetismLibrary.c:424:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(line, MAXLINELENGTH, MODELFILE); ^ EMM/GeomagnetismLibrary.c:436:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(line, MAXLINELENGTH, MODELFILE); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_robustReadMagModels’: EMM/GeomagnetismLibrary.c:472:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(line, MAXLINELENGTH, MODELFILE); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_GeomagIntroduction_EMM’: EMM/GeomagnetismLibrary.c:600:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%c%/[^\n]", &ans); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_GeomagIntroduction_WMM’: EMM/GeomagnetismLibrary.c:676:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] scanf("%c%/[^\n]", &help); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_GetUserGrid’: EMM/GeomagnetismLibrary.c:768:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:772:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:776:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:780:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:784:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:788:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:796:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:800:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:804:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:810:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:814:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:818:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:823:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:827:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:831:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:836:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:841:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c:848:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 20, stdin); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_GetUserInput’: EMM/GeomagnetismLibrary.c:913:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:954:17: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:964:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1005:17: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1016:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1049:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1067:17: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1092:21: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1102:13: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c:1117:25: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 40, stdin); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_Warnings’: EMM/GeomagnetismLibrary.c:1403:13: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(ans, 20, stdin); ^ EMM/GeomagnetismLibrary.c:1409:13: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(ans, 20, stdin); ^ EMM/GeomagnetismLibrary.c:1416:17: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(ans, 20, stdin); ^ EMM/GeomagnetismLibrary.c:1450:17: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(ans, 20, stdin); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_readMagneticModel’: EMM/GeomagnetismLibrary.c:1974:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str, 80, MAG_COF_File); ^ EMM/GeomagnetismLibrary.c:1979:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str, 80, MAG_COF_File); ^ EMM/GeomagnetismLibrary.c: In function ‘MAG_readMagneticModel_Large’: EMM/GeomagnetismLibrary.c:2044:5: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str, 80, MAG_COF_File); ^ EMM/GeomagnetismLibrary.c:2052:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str, 80, MAG_COF_File); ^ EMM/GeomagnetismLibrary.c:2054:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str2, 80, MAG_COFSV_File); ^ EMM/GeomagnetismLibrary.c:2067:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(c_str, 80, MAG_COF_File); ^ cc1: some warnings being treated as errors error: command 'gcc' failed with exit status 1
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/maaijke/RMextract/issues/1#issuecomment-203528855
I am using the system in Leiden Observatory. I am not so sure which information you need. Below are some outputs I can think of:
uname -r 4.4.4-301.fc23.x86_64
cat /proc/version Linux version 4.4.4-301.fc23.x86_64 (mockbuild@bkernel02.phx2.fedoraproject.org) (gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC) ) #1 SMP Fri Mar 4 17:42:42 UTC 2016
Is this the information you need?
gcc 5 is fairly new. It looks like it is finding problems in the code that gcc 4 did not. The final statement says that some warnings are being treated as errors. Is there some flag that can be set to turn off converting warnings to errors? All my machines run gcc 4.8.4 so unfortunately i cannot help much with gcc 5 problems.
And the issue is in the GEomagnetism library, which is code from WMM...not my code unfortunately. I am trying to see if they have an updated version of their code.
Maaijke
On 03/30/2016 07:27 PM, Tony Willis wrote:
gcc 5 is fairly new. It looks like it is finding problems in the code that gcc 4 did not. The final statement says that some warnings are being treated as errors. Is there some flag that can be set to turn off converting warnings to errors? All my machines run gcc 4.8.4 so unfortunately i cannot help much with gcc 5 problems.
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/maaijke/RMextract/issues/1#issuecomment-203540704
HI, I also don't have a gcc5 to test here. I added a compile flag in the setup.py, maybe/hopefully it will do the trick for now. Could you doa "git pull" and try again?
Maaijke
On 03/30/2016 07:12 PM, Duy Hoang wrote:
I am using the system in Leiden Observatory. I am not so sure which information you need. Below are some outputs I can think of:
uname -r 4.4.4-301.fc23.x86_64
cat /proc/version Linux version 4.4.4-301.fc23.x86_64 (mockbuild@bkernel02.phx2.fedoraproject.org mailto:mockbuild@bkernel02.phx2.fedoraproject.org) (gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC) ) #1 https://github.com/maaijke/RMextract/issues/1 SMP Fri Mar 4 17:42:42 UTC 2016
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/maaijke/RMextract/issues/1#issuecomment-203533579
Thanks, Maaijke, Tony. This bug fix seems to work. I have re-built and installed the package. The build step still had warnings about GeomagnetismLibrary, but it finished in the end. The install step didn't have any warnings or errors, which is good.
I have tried few of the commands. They seem to work. Thanks!
$ createRMParmdb -h pyrap will be used to compute positions Usage: createRMParmdb [options]
Options: -h, --help show this help message and exit -o PARMDBNAME, --out=PARMDBNAME name of the parmdb -p PATCH, --patch=PATCH name of the patch or source for which to create the values --IONprefix=PREFIX prefix of IONEX files, either CODG or ROBR --IONserver=SERVER server of IONEX files --IONpath=IONEXPATH location of IONEX files -a, --all calculate RM per station (default calculates only for CS002LBA) -t TIMESTEP, --timestep=TIMESTEP timestep in seconds. for values <=0 (default) the timegrid of the MS is used -e EARTH_ROT, --smart_interpol=EARTH_ROT float parameter describing how much of earth rotation is taken in to account in interpolation of the IONEX files. 1.0 means time interpolation assumes ionosphere rotates in opposite direction of the Earth. 0.0 (default) means no rotation applied -r, --overwrite overwrite existing parmdb
$ createRMParmdb data_channel32.ms pyrap will be used to compute positions Successful readonly open of default-locked table data_channel32.ms: 24 columns, 6317160 rows Successful readonly open of default-locked table data_channel32.ms/ANTENNA: 10 columns, 60 rows Successful readonly open of default-locked table data_channel32.ms/ANTENNA: 10 columns, 60 rows ('earth_rot', 0) ('timerange ', 0) ('use_azel ', False) Successful readonly open of default-locked table data_channel32.ms: 24 columns, 6317160 rows Successful readonly open of default-locked table data_channel32.ms/FIELD: 10 columns, 1 rows Successful readonly open of default-locked table data_channel32.ms/ANTENNA: 10 columns, 60 rows Successful readonly open of default-locked table data_channel32.ms/ANTENNA: 10 columns, 60 rows getting time 4931223065.01s getting ionexfile for 4931222165.01 file needed: 2015/CODG0520.15I.Z 14 checking ./CODG0520.15I False retreiving waiting 0 100 retreiving executing URL_download.py ['URL_download.py', 'ftp://ftp.unibe.ch/aiub/CODE/2015/CODG0520.15I.Z', './CODG0520.15I.Z', '100'] using PyCurl ('URL=', 'ftp://ftp.unibe.ch/aiub/CODE/2015/CODG0520.15I.Z', ' File=', './CODG0520.15I.Z') curl getting data at ftp://ftp.unibe.ch/aiub/CODE/2015/CODG0520.15I.Z waiting 1 100 waiting 2 100 curl closing for ftp://ftp.unibe.ch/aiub/CODE/2015/CODG0520.15I.Z 0 ('generating data for station ', 'CS002HBA0') *** finished ionosphere predictions ***
RMextract seems to compile OK with gcc 5.3 on ubuntu 16.04 LTS
I tried setting up the package on my windows 10 pc with python setup.py install
and I got failed with exit status 2
.
This is the output after running python setup.py install
.
running install
running bdist_egg
running egg_info
running build_src
build_src
building extension "_EMM_Model" sources
build_src: building npy-pkg config files
writing RMextract.egg-info\PKG-INFO
writing dependency_links to RMextract.egg-info\dependency_links.txt
writing top-level names to RMextract.egg-info\top_level.txt
reading manifest file 'RMextract.egg-info\SOURCES.txt'
writing manifest file 'RMextract.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
Missing compiler_cxx fix for MSVCCompiler
customize MSVCCompiler using build_ext
building '_EMM_Model' extension
compiling C sources
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\This pc\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -IC:\Python38\include -IC:\Python38\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /TcEMM/GeomagnetismLibrary.c /Fobuild\temp.win-amd64-3.8\Release\EMM/GeomagnetismLibrary.obj -Wno-format-security /Zm1000
cl : Command line error D8021 : invalid numeric argument '/Wno-format-security'
error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\This pc\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -IC:\Python38\include -IC:\Python38\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /TcEMM/GeomagnetismLibrary.c /Fobuild\temp.win-amd64-3.8\Release\EMM/GeomagnetismLibrary.obj -Wno-format-security /Zm1000" failed with exit status 2
I'm closing this issue. It's 8 years old, and doesn't have any recent updates.
Hi maaijke,
I am trying to install RMextract to a directory $HOME/lofar/RMextract (as I don't have root account), but I got this error:
python setup.py build --add-lofar-utils --prefix $HOME/lofar/RMextract usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help
error: option --prefix not recognized
Do you have idea how to fix this?
Thanks, Duy