-
Notifications
You must be signed in to change notification settings - Fork 207
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
IBM iSeries(AS/400) PASE using AIX platform results in GT initialization failure / linking issues #205
Comments
I've introduced AIX support to Harbour some years ago. AIX linker is really cumbersome in making optimizations. Most of the time it requested all the function symbols for me, so i made some workaround back then: See You can comment the workaround block to see if the GT terminal starts, but the binary will large. |
It didn't work ... when commenting on these lines I received several errors at linking time |
Not sure if you have already seen: At the time on AIX i've used a packaged GCC 4.2. Without seeing those link errors, i'd say that AIX linker may be more confused by the output of the recent version of this compiler. |
Unsuccessfully :/ I'm using gcc 6.3 |
Interesting job. You could compile (and particularly link the binary) on "regular" AIX. I still think that this is a linking issue, maybe PASE linker is even more awkward than ld supplied by AIX system. PASE advertises being binary compatible with AIX, so this could be a method. Anyway the linker issue seems to be around handling .ctor sections. |
I tried thousands of alternatives on the linker command line ... but the same error always occurred |
Don't know if it's something serious that you do or it's just a research, but you can try following binaries, if they will run in PASE: |
In fact i've already tested that using AIX for the job is the way to go. If you have a service contract with IBM then the best would be to make a self contained examples of the linker cases. On AIX and probably also with PASE there is no gcc linker used, gcc just reuses system linker - so they should consider fixing it. |
which command line did you use to compile?
? |
HB_USER_CFLAGS=-maix64 HB_USER_LDFLAGS=-maix64 |
ok... I got a error linking with "rt" Let's make step by step:
The PASE don't have the RT lib..., so, I just removed it from the libs.mk and, I did a another test...
|
librt was introduced in AIX 5.2, but it's not generally needed by Harbour, although it may be needed by the compiler toolchain. Recently (on other UNIX systems) librt is disappearing too, and it's exported functions are made available from standard libc. So it's not the source of the problem The linker is still wrong and in case of PASE, it optimizes out (and discards) .ctor sections referenced from object files. |
Some options for the LDFLAGS/HB_USER_LDFLAGS to try yourself: |
on gcc.mk, where to put this command: -Wl,-bcdtors ? on: LDFLAGS += $(LIBPATHS) # -Wl,-bnoquiet The tests that I did using this options Not worked... :/ Command example: |
-bcdtors alone when you're using "ld" directly, but with gcc and HB_USER_LDFLAGS= you need to use -Wl,-bcdtors Maybe PASE linker does not support this AIX 7 option, but don't know really. |
Oh, my mistake... I forgot to change the file permissions.... |
Correction ... the compiler compiles successfully, only the HBMK2 that does not work correctly |
Because hbmk2 is not being linked correctly in PASE environment. Any other harbour application will fail the same way in final linking. I think you have your own build of [...]/bin/aix/gcc/hbtest, check it out if it fails. |
Not sure if anyone is still interested in pursuing this, but some suggestions for trying to build in PASE:
|
@ThePrez That is awesome!!! |
@ThePrez well, not worked :/ I used this command line: I still got the same GT error:
|
I'm trying to use Harbour on AIX but, while I'm building I get this error:
The text was updated successfully, but these errors were encountered: