Обсуждение: Compilation fails with XLC in AIX

Поиск
Список
Период
Сортировка

Compilation fails with XLC in AIX

От
"Ayappan P2"
Дата:

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


Вложения

Re: Compilation fails with XLC in AIX

От
"Inoue, Hiroshi"
Дата:
Hi Ayappan,

Thanks for your bug report.
I would commit the patch.

regards,
Hiroshi Inoue

On 2018/03/13 0:10, Ayappan P2 wrote:

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

Re: Compilation fails with XLC in AIX

От
"Ayappan P2"
Дата:

Thanks for the commit.

Regards
Ayappan P

Inactive hide details for "Inoue, Hiroshi" ---03/14/2018 01:11:35 PM---Hi Ayappan, Thanks for your bug report.

From: "Inoue, Hiroshi" <h-inoue@dream.email.ne.jp>
To: Ayappan P2 <ayappap2@in.ibm.com>
Cc: pgsql-odbc@postgresql.org
Date: 03/14/2018 01:11 PM
Subject: Re: Compilation fails with XLC in AIX





Hi Ayappan,

Thanks for your bug report.
I would commit the patch.

regards,
Hiroshi Inoue

On 2018/03/13 0:10, Ayappan P2 wrote:
      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


Вложения