aix

When is a>a true?

三世轮回 提交于 2019-12-20 03:09:15
问题 Right, I think I really am living a dream. I have the following piece of code which I compile and run on an AIX machine: AIX 3 5 PowerPC_POWER5 processor type IBM XL C/C++ for AIX, V10.1 Version: 10.01.0000.0003 #include <stdio.h> #include <math.h> #define RADIAN(x) ((x) * acos(0.0) / 90.0) double nearest_distance(double radius,double lon1, double lat1, double lon2, double lat2){ double rlat1=RADIAN(lat1); double rlat2=RADIAN(lat2); double rlon1=lon1; double rlon2=lon2; double a=0,b=0,c=0; a

Handling null pointers on AIX with GCC C

怎甘沉沦 提交于 2019-12-19 18:47:35
问题 We have a code written in C that sometimes doesn’t handle zero pointers very well. The code was originally written on Solaris and such pointers cause a segmentation fault. Not ideal but better than ploughing on. Our experience is that if you read from a null pointer on AIX you get 0. If you use the xlc compiler you can add an option -qcheck=all to trap these pointers. But we use gcc (and want to continue using that compiler). Does gcc provide such an option? 回答1: Does gcc provide such an

Getting an error - AttributeError: 'module' object has no attribute 'run' while running subprocess.run([“ls”, “-l”])

自作多情 提交于 2019-12-18 07:29:19
问题 I am running on a AIX 6.1 and using Python 2.7. Want to execute following line but getting an error. subprocess.run(["ls", "-l"]) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'run' 回答1: The subprocess.run() function only exists in Python 3.5 and newer. It is easy enough to backport however: def run(*popenargs, **kwargs): input = kwargs.pop("input", None) check = kwargs.pop("handle", False) if input is not None: if

[AIX] HACMP双机配置

☆樱花仙子☆ 提交于 2019-12-16 12:02:47
1、smitty clstart 启动HA双机 2、smitty clstop 停止HA双机 3、stopsrc -s 双机进程名 停止单个HA双机进程 4、startsrc -s 双机进程名 启动单个HA双机进程 调试HACMP命令参考 运行中为调测可能需要暂停HACMP的监控功能,或者不停止HACMP而执行切换类似的操作,HACMP5.2均已提供类似功能,可供调测双机中使用。 Online激活运行资源组。 #smitty hacmp 选择“System Management (C-SPOC) > HACMP Resource Group and Application Management > Bring a Resource Group Online”。 offline停止运行资源组。 #smitty hacmp 选择“System Management (C-SPOC) > HACMP Resource Group and Application Management > Bring a Resource Group Offline”。 move切换资源组至另一节点。 #smitty hacmp 选择“System Management (C-SPOC) > HACMP Resource Group and Application Management > Move a

Perl: Unknown charname \N{alpha}

被刻印的时光 ゝ 提交于 2019-12-14 02:29:55
问题 I am trying to build Encode 2.88-3 from CPAN on AIX 7.2. During the make test phase I receive various errors about unknown characters: Use of uninitialized value $txt in pattern match (m//) at /usr/opt/perl5/lib/5.20.1/_charnames.pm line 499. Unknown charname 'alpha' at t/Encode.t line 44, within string BEGIN not safe after errors--compilation aborted at t/Encode.t line 148. t/Encode.t ................. Use of uninitialized value $txt in pattern match (m//) at /usr/opt/perl5/lib/5.20.1/

How do I get C++ programs to link with gcc's stack protector feature on AIX?

核能气质少年 提交于 2019-12-13 17:55:43
问题 I'm a bit of an AIX newbie. I'm trying to compile a program using gcc's stack protector feature. I installed gcc on server using pware's GCC package and I can compile a sample program like: #include <stdio.h> int main(int argc,char **argv) { printf("hello world\n"); return 0; } When I turn on stack-protector though, I get: g++ -fstack-protector-all main.cpp collect2: library libssp_nonshared not found I've been hunting on google for a solution to this and it seems like my libc needs to have

1252-142 Syntax error from AIX assembler due to local label

核能气质少年 提交于 2019-12-13 17:04:30
问题 I'm catching an assembler error when using inline assembly and a local label. The compiler is GCC, and the machine is PowerPC running AIX. The code reads the timestamp (it is roughly equivalent to rdtsc ): static unsigned long long cpucycles( void ) { unsigned long long int result=0; unsigned long int upper, lower,tmp; __asm__ __volatile__ ( "0: \n\t" "mftbu %0 \n\t" "mftb %1 \n\t" "mftbu %2 \n\t" "cmpw %2,%0 \n\t" "bne- 0b \n\t" : "=r"(upper),"=r"(lower),"=r"(tmp) : : ); result = upper;

$(TZ=MSZ+24 date +“%d%m%Y”) not working as expected during daylight savings?

混江龙づ霸主 提交于 2019-12-13 08:34:52
问题 I have a script that makes use of $(TZ=MSZ+24 date +"%d%m%Y") to get yesterday's date in BASH (AIX system). So far it's worked flawlessly for 5 months, until last night, when it didn't worked properly. Usually it runs at 01:00 AM server time, but last night something strange happened, and the only reason it wouldn't have worked is because of $(TZ=MSZ+24 date +"%d%m%Y") . So, my question is, if Saturday night the clock went forward 1 hour, could it influence $(TZ=MSZ+24 date +"%d%m%Y") so when

sed in AIX script do not work with special chars [duplicate]

帅比萌擦擦* 提交于 2019-12-13 06:30:58
问题 This question already has answers here : How to use a bash script variable with sed [duplicate] (3 answers) sed substitution with bash variables (4 answers) Closed 3 years ago . I created a script that is generating HTML code. At the end of the script, I need to hightlight some words in a table by making them bold. So I need to replace in the code, every instance of WORD by WORD or WORD of course, WORD is stored in a variable $CODE to make this much more harder. I tryed to used the sed

How to add linker option to CMake bootstrap?

落爺英雄遲暮 提交于 2019-12-13 05:50:04
问题 I'm building CMake 3.12.4 from the release tarball on AIX. CMake is failing to link on the machine: ld: 0711-781 ERROR: TOC overflow. TOC size: 65632 Maximum size: 65536 The error is detailed in the IBM technotes at ld: 0711-781 ERROR: TOC overflow. I want to add -bbigtoc linker option for the cmake recipe. CMake's bootstrap does not appear to accept linker options for LDFLAGS as shown below. How do I add a linker flag to the bootstrap process? Here are the options CMake bootstrap accepts: $