Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compile C on AIX 5.3 and run on AIX 4.3.3

134 views
Skip to first unread message

Loial

unread,
Feb 13, 2007, 9:24:16 AM2/13/07
to
We are running AIX 5.3 (64 bit kernal). We develop using the IBM XL C
compiler version 7.

For one site we need to run on AIX 4.3.3. Can we compile on AIX 5.3
and run on AIX 4.3.3?

Gary R. Hook

unread,
Feb 13, 2007, 10:11:49 AM2/13/07
to
Loial wrote:
> For one site we need to run on AIX 4.3.3. Can we compile on AIX 5.3
> and run on AIX 4.3.3?

No. The general rule is that you compile and build on the earliest
level you need to support.

Loial

unread,
Feb 14, 2007, 3:22:45 AM2/14/07
to
Is it not possible to set compiler options to generate code that will
run on AIX 4.3.3?

Mark Taylor

unread,
Feb 14, 2007, 6:56:41 AM2/14/07
to
On Feb 14, 8:22 am, "Loial" <a...@loial.co.uk> wrote:
> Is it not possible to set compiler options to generate code that will
> run on AIX 4.3.3?

No, not at all ... ref: http://www-03.ibm.com/servers/aix/os/
compatibility/

HTH
Mark Taylor


rajbir

unread,
Feb 15, 2007, 1:00:49 AM2/15/07
to

It is possible to compile on a later version and run it on a previous
version. But you must be really really lucky - I repeat, really lucky,
if you see your program running. The best thing to do is to compile on
the earliest possible version you are going to support. IBM guarantees
backward compatibilty, unless, of course, you are doing something like
your application needs to be notified when a cpu is removed (only in
these special cases, backward compatibility doesn't work).
The problem is that although the code may be compatible, the libc,
system calls, libpthreads calls in the new version and the old version
would have changed dramatically, so much so that your code will not
load at all.

Thanks and regards,
Rajbir Bhattacharjee

Ron Hosler

unread,
Feb 15, 2007, 1:20:35 AM2/15/07
to
I've done it many times.

It's trivial to compile ghostscript on AIX5.2 and have it run on AIX4.3

The best case is when you stick to the libc functions that existed in
AIX4.3, there are no changes to source code or Makefiles. Lynx compiles
on AIX5.2 and runs on AIX43 because dump -TupvX32_64 /usr/local/bin/lynx
shows that is doesn't rely on any libc function listed below. It simply works.
GNU make compiles OK but won't run if bos.rte.libc < 4.3.3.50 because
strsignal first appeared in 4.3.3.50 (2001-03-27).

The worst case is when the source code uses a libc function that changed
implementation in newer versions. For example bzero changed in 5.1.0.25.
It now references ___bzero which only exists in versions since 5.1.0.25.
There are now two choices:
1 - compile on AIX5.1 where bos.rte.libc >= 5.1.0.25 and ___bzero exists
2 - have complete copies of all libraries and include files from AIX4.3
create a new vac.cfg file which points to the copied files
compile with xlc -F newvac.cfg or export export XL_CONFIG=path_to_43.cfg

Excerpt from 43.cfg
xlc: use = DEFLT
crt = /scratch/cc/aix43/usr/lib/crt0.o
mcrt = /scratch/cc/aix43/usr/lib/mcrt0.o
gcrt = /scratch/cc/aix43/usr/lib/gcrt0.o
libraries = /scratch/cc/aix43/usr/lib/libc.a
proflibs = -L/lib/profiled,-L/usr/lib/profiled
options = -qansialias,-I/scratch/cc/aix43/usr/include


The following is a list of libc functions that have been added or
changed implementation since bos.rte.libc.4.3.3.0, it only goes up to
5.2.0.98 since I don't follow AIX5.3 changes (we only run 4.3, 5.1 and 5.2).

AFclear 5.2.0.1
BeginCriticalSection 5.1.0.25
DisableCriticalSections 5.1.0.25
EnableCriticalSections 5.1.0.25
EndCriticalSection 5.1.0.25
_Exit 5.2.0.1
___bzero 5.1.0.25
___fill 5.1.0.25
___memccpy 5.2.0.1
___memcmp 5.2.0.1
___memcpy 5.1.0.25
___memmove 5.1.0.25
___memset 5.1.0.25
___strstr 5.2.0.1
__assert_c99 5.2.0.10
__chaclx 5.2.0.1
__evHighestFD 4.3.3.13
__fchaclx 5.2.0.1
__fstataclx 5.2.0.1
__h_errno_set 4.3.3.13
__lc_charmap_ptr 5.1.0.52
__lc_collate_ptr 5.1.0.52
__lc_ctype_ptr 5.1.0.52
__lc_locale_ptr 5.1.0.52
__lc_monetary_ptr 5.1.0.52
__lc_numeric_ptr 5.1.0.52
__lc_resp_ptr 5.1.0.52
__lc_time_ptr 5.1.0.52
__linux_alphasort 5.1.0.25
__linux_alphasort64 5.2.0.41
__linux_calloc 5.1.0.25
__linux_free 5.1.0.25
__linux_gethostbyaddr_r 5.1.0.25
__linux_gethostbyname_r 5.1.0.25
__linux_malloc 5.1.0.25
__linux_ptrace 4.3.3.27
__linux_quotactl 4.3.3.27
__linux_readdir64_r 5.2.0.41
__linux_readdir_r 5.1.0.25
__linux_realloc 5.1.0.25
__linux_reboot 4.3.3.27
__linux_scandir 5.1.0.25
__linux_scandir64 5.2.0.41
__linux_strerror_r 4.3.3.27
__linux_valloc 5.1.0.25
__log_close_debug_channels 5.2.0.50
__log_set_file_owner 5.2.0.50
__memactive 5.2.0.50
__memget_record 4.3.3.13
__memput_record 4.3.3.13
__n_userkeys 5.2.0.95
__ns_datetosecs 4.3.3.13
__ns_find_tsig 4.3.3.13
__ns_makecanon 4.3.3.13
__ns_name_ntol 4.3.3.13
__ns_name_rollback 4.3.3.27
__ns_name_skip 4.3.3.13
__ns_samedomain 4.3.3.13
__ns_samename 4.3.3.13
__ns_skiprr 4.3.3.13
__ns_subdomain 4.3.3.13
__p_cert_syms 4.3.3.13
__p_key_syms 4.3.3.13
__p_rcode_syms 4.3.3.13
__pag_getid 5.2.0.1
__pag_getname 5.2.0.1
__pag_getvalue 5.2.0.1
__pag_setname 5.2.0.1
__pag_setvalue 5.2.0.1
__readlink64 5.2.0.51
__res_state 4.3.3.13
__rs_pickmcm 5.2.0.1
__stataclx 5.2.0.1
__strtollmax 5.2.0.10
__vfscanf128 4.3.3.27
__vfscanf64 4.3.3.27
__vscanf128 4.3.3.27
__vscanf64 4.3.3.27
__vsscanf128 4.3.3.27
__vsscanf64 4.3.3.27
__which_res_state 4.3.3.13
__xNCcollate 5.1.0.52
__xNCcoluniq 5.1.0.52
__xNCcolval 5.1.0.52
__x_NCxcolu 5.1.0.52
__x_NLxcol 5.1.0.52
__x_NLxcolu 5.1.0.52
__x__getmaxdispwidth 5.1.0.52
__x__getmbcurmax 5.1.0.52
__x__isowcsftime 5.1.0.52
__x__mbstopcs 5.1.0.52
__x__mbtopc 5.1.0.52
__x__pcstombs 5.1.0.52
__x__pctomb 5.1.0.52
__x_tolower 5.1.0.52
__x_toupper 5.1.0.52
__xclose_locale 5.1.0.63
__xcsid 5.1.0.52
__xfnmatch 5.1.0.52
__xis_wctype 5.1.0.52
__xisalnum 5.1.0.52
__xisalpha 5.1.0.52
__xisblank 5.1.0.52
__xiscntrl 5.1.0.52
__xisdigit 5.1.0.52
__xisgraph 5.1.0.52
__xislower 5.1.0.52
__xisprint 5.1.0.52
__xispunct 5.1.0.52
__xisspace 5.1.0.52
__xisupper 5.1.0.52
__xiswalnum 5.1.0.52
__xiswalpha 5.1.0.52
__xiswblank 5.1.0.52
__xiswcntrl 5.1.0.52
__xiswctype 5.1.0.52
__xiswdigit 5.1.0.52
__xiswgraph 5.1.0.52
__xiswlower 5.1.0.52
__xiswprint 5.1.0.52
__xiswpunct 5.1.0.52
__xiswspace 5.1.0.52
__xiswupper 5.1.0.52
__xiswxdigit 5.1.0.52
__xisxdigit 5.1.0.52
__xlocaleconv 5.1.0.52
__xmblen 5.1.0.52
__xmbrtowc 5.1.0.52
__xmbstowcs 5.1.0.52
__xmbtowc 5.1.0.52
__xnl_langinfo 5.1.0.52
__xopen_locale 5.1.0.63
__xregcomp 5.1.0.52
__xregerror 5.1.0.52
__xregexec 5.1.0.52
__xregfree 5.1.0.52
__xrpmatch 5.1.0.52
__xstrcoll 5.1.0.52
__xstrfmon 5.1.0.52
__xstrftime 5.1.0.52
__xstrncollen 5.1.0.52
__xstrptime 5.1.0.52
__xstrxfrm 5.1.0.52
__xtolower 5.1.0.52
__xtoupper 5.1.0.52
__xtowlower 5.1.0.52
__xtowupper 5.1.0.52
__xwcrtomb 5.1.0.52
__xwcscoll 5.1.0.52
__xwcsid 5.1.0.52
__xwcstombs 5.1.0.52
__xwcswidth 5.1.0.52
__xwcsxfrm 5.1.0.52
__xwctomb 5.1.0.52
__xwctype 5.1.0.52
__xwcwidth 5.1.0.52
_addcpucosts 5.2.0.1
_cancel_notification_thread 5.2.0.10
_create_notification_thread 5.2.0.10
_dr_notify 5.2.0.1
_dr_register 5.2.0.1
_dr_unregister 5.2.0.1
_group_cache_lock 5.1.0.25
_imaxabs32 5.2.0.1
_imaxdiv32 5.2.0.1
_isinf 5.2.0.1
_libc_chkpnt_restore 5.1.0.64
_libc_chkpnt_statesave 5.1.0.64
_libc_getsigcontext 5.1.0.25
_libc_getsigcontext1 5.1.0.25
_libc_getsigcontext_st 5.1.0.25
_libc_lock_ctime 5.1.0.35
_libc_unlock_ctime 5.1.0.35
_readdir64 5.2.0.41
_rmcpucosts 5.2.0.1
_rmlmbcost 5.2.0.1
_sem_destroy_unnamed 5.2.0.30
_sigqueue 5.2.0.10
_sigtimedwait 5.2.0.10
_strtollmax 5.2.0.1
_strtoumax32 5.2.0.1
_user_cache_lock 5.1.0.25
_validate_pag 5.2.0.1
_wcstoimax32 5.2.0.1
_wcstoumax32 5.2.0.1
acl_fget_with_type 5.1.0.28
acl_fput_with_type 5.1.0.28
acl_fset_with_type 5.1.0.28
acl_get_with_type 5.1.0.28
acl_put_with_type 5.1.0.28
acl_set_with_type 5.1.0.28
addmntent 4.3.3.50
alphasort64 5.2.0.41
atoll 5.2.0.1
cap_clear 5.1.0.25
cap_dup 5.1.0.25
cap_free 5.1.0.25
cap_get_flag 5.1.0.25
cap_get_proc 5.1.0.25
cap_init 5.1.0.25
cap_set_flag 5.1.0.25
cap_set_proc 5.1.0.25
cfmakeraw 4.3.3.50
cfsetspeed 4.3.3.50
checkpnt 5.1.0.25
checkpnt_block 5.1.0.25
checkpnt_commit 5.1.0.25
checkpnt_deliver 5.1.0.25
checkpnt_fail 5.1.0.25
checkpnt_register 5.1.0.25
checkpnt_wait 5.1.0.25
clnttcp6_create 5.2.0.1
clntudp6_create 5.2.0.1
clock_getcpuclockid 5.2.0.30
closedir64 5.2.0.41
coredump 5.1.0.25
dr_reconfig 5.1.0.35
endmntent 4.3.3.50
endusershell 4.3.3.27
fgetpwent 4.3.3.27
free_after 5.2.0.1
freehostent 5.1.0.25
fstat64x 5.2.0.41
fstatfs64 5.2.0.41
fstatvfs64 5.2.0.41
gencore 5.2.0.1
get_current_dir_name 4.3.3.50
get_malloc_log 5.2.0.1
get_malloc_log_live 5.2.0.1
getcrid 5.1.0.25
getdirent64 5.2.0.41
getdirentries 5.1.0.25
getipnodebyaddr 5.1.0.25
getipnodebyname 5.1.0.25
getmntent 4.3.3.50
getpagdata 5.2.0.1
getpaglist 5.2.0.1
getpagvalue 5.2.0.1
getpeereid 5.2.0.40
getprocs64 5.1.0.25
getrpcport 4.3.3.50
getrpid 5.1.0.25
getrtid 5.1.0.25
getthrds64 5.1.0.25
getusershell 4.3.3.27
getvtid 5.1.0.35
hasmntopt 4.3.3.50
htonll 5.1.0.25
imaxabs 5.2.0.1
imaxdiv 5.2.0.1
in6addr_loopback 5.1.0.25
isblank 4.3.3.50
isc_gethexstring 5.2.0.50
isc_movefile 5.2.0.50
isc_puthexstring 5.2.0.50
isinf 4.3.3.27
iswblank 4.3.3.27
kcap_get_proc 5.1.0.25
kcap_set_proc 5.1.0.25
kra_fork 5.1.0.25
kra_mmapv 5.1.0.25
kthread_ctl 5.1.0.25
lstat64x 5.2.0.41
mallinfo_heap 5.2.0.1
malloc_err_function 5.2.0.1
malloc_log_size 5.2.0.1
malloc_log_table 5.2.0.1
mbsnrtowcs 4.3.3.50
memmem 4.3.3.50
mkcrid 5.1.0.25
mkstemp64 4.3.3.93
mread_real_time 5.2.0.75
ntohll 5.1.0.25
on_exit 4.3.3.50
opendir64 5.2.0.41
p_rcode 4.3.3.13
passwdpolicy 5.1.0.53
passwdstrength 5.1.0.53
pmap_getport6 5.2.0.1
posix_openpt 5.2.0.1
projctl 5.2.0.40
ptrace64 5.1.0.25
ra_attach 5.1.0.25
ra_attachrset 5.2.0.1
ra_detach 5.1.0.25
ra_detach_all 5.1.0.25
ra_detachrset 5.2.0.1
ra_execl 5.1.0.25
ra_execle 5.1.0.25
ra_execlp 5.1.0.25
ra_exect 5.1.0.25
ra_execv 5.1.0.25
ra_execve 5.1.0.25
ra_execvp 5.1.0.25
ra_fork 5.1.0.25
ra_free_attachinfo 5.1.0.25
ra_get_attachinfo 5.1.0.25
ra_getrset 5.2.0.1
ra_mmap 5.1.0.25
ra_mmapv 5.1.0.25
ra_shmget 5.1.0.25
ra_shmgetv 5.1.0.25
readdir64 5.2.0.41
readdir64_r 5.2.0.41
records_per_heap 5.2.0.1
res_buildprotolist 4.3.3.13
res_buildservicelist 4.3.3.13
res_destroyprotolist 4.3.3.13
res_destroyservicelist 4.3.3.13
res_findzonecut 4.3.3.13
res_hostalias 4.3.3.13
res_nametoclass 5.2.0.50
res_nametotype 5.2.0.50
res_nclose 4.3.3.13
res_ninit 4.3.3.13
res_nmkquery 4.3.3.13
res_nmkupdate 4.3.3.13
res_nquery 4.3.3.13
res_nquerydomain 4.3.3.13
res_nsearch 4.3.3.13
res_nsend 4.3.3.13
res_nupdate 4.3.3.13
res_ourserver_p 4.3.3.13
res_pquery 4.3.3.13
res_protocolname 4.3.3.13
res_protocolnumber 4.3.3.13
res_servicename 4.3.3.13
res_servicenumber 4.3.3.13
reset_malloc_log 5.2.0.1
resetpagvalue 5.2.0.1
restart 5.1.0.25
restart_wait 5.1.0.25
rewinddir64 5.2.0.41
rmsock 5.1.0.25
rs_addlocal 5.1.0.25
rs_alloc 5.1.0.25
rs_discardname 5.1.0.25
rs_find 5.1.0.25
rs_free 5.1.0.25
rs_getassociativity 5.2.0.1
rs_getinfo 5.1.0.25
rs_getinfo_detailed 5.1.0.25
rs_getlatency 5.1.0.25
rs_getlocation 5.1.0.25
rs_getnameattr 5.1.0.25
rs_getnamedrset 5.1.0.25
rs_getpartition 5.1.0.25
rs_getrad 5.1.0.25
rs_getsysavail 5.1.0.25
rs_getsystem 5.1.0.25
rs_init 5.2.0.1
rs_numrads 5.1.0.25
rs_op 5.1.0.25
rs_radid 5.1.0.25
rs_registername 5.1.0.25
rs_setnameattr 5.1.0.25
rs_setpartition 5.2.0.1
rs_test 5.1.0.25
scandir64 5.2.0.41
sdl2idx_page 5.1.0.25
seekdir64 5.2.0.41
setcrid 5.1.0.25
setenv 4.3.3.27
setmntent 4.3.3.50
setpagdata 5.2.0.1
setpagvalue 5.2.0.1
setusershell 4.3.3.27
siggetmask 4.3.3.50
sigwait 5.2.0.10
sockatmark 5.2.0.1
splice 5.1.0.25
stack_depth 5.2.0.1
stat64x 5.2.0.41
statfs64 5.2.0.41
statvfs64 5.2.0.41
stpcpy 4.3.3.50
stpncpy 4.3.3.50
strndup 4.3.3.27
strnlen 4.3.3.27
strsep 4.3.3.27
strsignal 4.3.3.50
strtoimax 4.3.3.27
strtoumax 5.2.0.1
syncvfs 5.2.0.1
sysfs 4.3.3.50
telldir64 5.2.0.41
thread_post 5.1.0.25
thread_post_many 5.1.0.25
thread_unlock 4.3.3.50
thread_wait 5.1.0.25
thread_waitlock 4.3.3.50
ttylock_force 5.1.0.25
ue_proc_register 5.2.0.1
ue_proc_unregister 5.2.0.1
ukey_enable 5.2.0.95
ukey_getkey 5.2.0.95
ukey_protect 5.2.0.95
ukeyset_activate 5.2.0.95
ukeyset_add_key 5.2.0.95
ukeyset_add_set 5.2.0.95
ukeyset_init 5.2.0.95
ukeyset_ismember 5.2.0.95
ukeyset_remove_key 5.2.0.95
ukeyset_remove_set 5.2.0.95
unsetenv 5.2.0.1
updwtmp 4.3.3.50
ura_get_attachinfo 5.1.0.25
vfscanf 4.3.3.27
vfwscanf 5.2.0.1
vmgetinfo 5.1.0.25
vscanf 4.3.3.27
vsscanf 4.3.3.27
vswscanf 5.2.0.1
vwscanf 5.2.0.1
wait4 4.3.3.50
wcpcpy 4.3.3.50
wcpncpy 4.3.3.50
wcscasecmp 4.3.3.27
wcsdup 4.3.3.27
wcsncasecmp 4.3.3.27
wcsnlen 4.3.3.27
wcsnrtombs 4.3.3.27
wcstof 4.3.3.27
wcstoimax 5.2.0.1
wcstold 4.3.3.27
wcstoumax 5.2.0.1

Gary R. Hook

unread,
Feb 20, 2007, 1:51:14 PM2/20/07
to
Ron Hosler wrote:
> I've done it many times.
>
> It's trivial to compile ghostscript on AIX5.2 and have it run on AIX4.3

That's all well and fine, and your comprehensive list of libc functions
is quite impressive. But there's more to it than that.

Fundamentally, what the OP wants to do is not supported. IMO their
customers will get little assistance from IBM for that kind of
configuration. Besides, who builds applications and ships them to
customers without actually _testing_ them on the target system?

0 new messages