Compilation fails with XLC in AIX
"Ayappan P2" <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.odbc |
|---|---|
| Message-ID | <OFABAC00B8.D19BB30A-ON0025824E.00512841-6525824E.0053529E@notes.na.collabserv.com> |
Hi,
I am compiling PostgreSQL ODBC driver 10.01.0000 in AIX using XLC compiler.
Compilation fails with the following error.
ld: 0711-317 ERROR: Undefined symbol: .getExeName
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
Makefile:573: recipe for target 'psqlodbcw.la' failed
gmake[1]: *** [psqlodbcw.la] Error 8
gmake[1]: Leaving directory
'/home/root/postgres_source/psqlodbc-10.01.0000'
Makefile:479: recipe for target 'all' failed
gmake: *** [all] Error 2
getExeName is no more there after this commit "Move the implemetation of
GetExeName() from psqlodbc.c(psqlsetup.c) to mylog.c"
The commit missed out cleaning it from this path (in file psqlodbc.c)
+175 #else /* not
__GNUC__ */
+176
+177 /* Shared library initialization on non-gcc systems. */
+178 BOOL
+179 _init(void)
+180 {
+181 getExeName();
+182 initialize_global_cs();
+183 return TRUE;
+184 }
Because of this , the compilation fails for non-gcc systems ( in this case
AIX with XLC ). I am attaching a patch here that will fix the issue.
(See attached file: Fix-build-for-non-gcc-systems.patch)
Thanks
Ayappan P
Fix-build-for-non-gcc-systems.patch
(application/octet-stream, 483 B)
From 6d7a6995295280f9dd6669fbba9040ece41169e3 Mon Sep 17 00:00:00 2001 From: Ayappan <[email protected]> Date: Mon, 12 Mar 2018 10:03:06 -0500 Subject: [PATCH] Fix build for non-gcc systems --- psqlodbc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/psqlodbc.c b/psqlodbc.c index b12916d..045efc1 100644 --- a/psqlodbc.c +++ b/psqlodbc.c @@ -178,7 +178,6 @@ psqlodbc_fini(void) BOOL _init(void) { - getExeName(); initialize_global_cs(); return TRUE; } -- 1.8.3.1