LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   AIX (http://www.linuxquestions.org/questions/aix-43/)
-   -   AIX for Linux gdb source failing on make (http://www.linuxquestions.org/questions/aix-43/aix-for-linux-gdb-source-failing-on-make-4175469297/)

MarkBurke 07-11-2013 12:32 PM

AIX for Linux gdb source failing on make
 
I'm in the gdb directory, and I've executed configure successfully. I am now running make, but experiencing an error in it, below. Make exits. Thanks for your help.

...
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE -DAIX_CORE -DAIX_WEAK_SUPPORT -I. -I. -I./../include -DHAVE_rs6000coff_vec -DHAVE_aix5coff64_vec -I./../intl -DBINDIR='"/usr/local/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bfd.lo -MD -MP -MF .deps/bfd.Tpo -c -o bfd.lo bfd.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE -DAIX_CORE -DAIX_WEAK_SUPPORT -I. -I. -I./../include -DHAVE_rs6000coff_vec -DHAVE_aix5coff64_vec -I./../intl -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bfd.lo -MD -MP -MF .deps/bfd.Tpo -c bfd.c -o bfd.o
bfd.c: In function '_bfd_default_error_handler':
bfd.c:730:3: error: value computed is not used [-Werror=unused-value]
cc1: all warnings being treated as errors

TB0ne 07-11-2013 01:11 PM

Quote:

Originally Posted by MarkBurke (Post 4988537)
I'm in the gdb directory, and I've executed configure successfully. I am now running make, but experiencing an error in it, below. Make exits. Thanks for your help.

...
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE -DAIX_CORE -DAIX_WEAK_SUPPORT -I. -I. -I./../include -DHAVE_rs6000coff_vec -DHAVE_aix5coff64_vec -I./../intl -DBINDIR='"/usr/local/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bfd.lo -MD -MP -MF .deps/bfd.Tpo -c -o bfd.lo bfd.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE -DAIX_CORE -DAIX_WEAK_SUPPORT -I. -I. -I./../include -DHAVE_rs6000coff_vec -DHAVE_aix5coff64_vec -I./../intl -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bfd.lo -MD -MP -MF .deps/bfd.Tpo -c bfd.c -o bfd.o
bfd.c: In function '_bfd_default_error_handler':
bfd.c:730:3: error: value computed is not used [-Werror=unused-value]
cc1: all warnings being treated as errors

Instead of installing Linux source on AIX, why not install the AIX GDB package?
http://www-03.ibm.com/systems/power/...ezinstall.html

MarkBurke 07-11-2013 01:22 PM

same link as open source
 
Quote:

Originally Posted by TB0ne (Post 4988557)
Instead of installing Linux source on AIX, why not install the AIX GDB package?
http://www-03.ibm.com/systems/power/...ezinstall.html

Thank you for helping. I would like to recompile (not the package in binaries). Just I am researching how to compile from source, because I have a need for it on the job. GDB is arbitrary, but is bringing an error that is common to all my compiling of open source. I am trying to learn.

When I go to the link above, I see the list of programs. I would like to click on AIX source link for GDB. However when I do, it transports me to ftp://ftp.gnu.org/gnu/gdb. This is the same as open source.

TB0ne 07-11-2013 01:44 PM

Quote:

Originally Posted by MarkBurke (Post 4988560)
Thank you for helping. I would like to recompile (not the package in binaries). Just I am researching how to compile from source, because I have a need for it on the job. GDB is arbitrary, but is bringing an error that is common to all my compiling of open source. I am trying to learn.

When I go to the link above, I see the list of programs. I would like to click on AIX source link for GDB. However when I do, it transports me to ftp://ftp.gnu.org/gnu/gdb. This is the same as open source.

Right...however, the package is for AIX. WHY do you need to compile from source? What would that provide, that the package would not?

What version of the source are you installing? And are you using the GCC compiler, versus the AIX C compiler??

MarkBurke 07-11-2013 02:12 PM

I'm just compiling from source as an exercise for my job. I have to do numerous packages for DB2 and WAS, and I'm trying to get situated with examining errors from source compile. Not all of the package RPMs will run, I will have to compile from source at some point.

The version of source GNU dbg is 7.6 (gdb-7.6.tar.gz). I am using the gcc compiler, it is version 4.6.1

TB0ne 07-11-2013 02:32 PM

Quote:

Originally Posted by MarkBurke (Post 4988589)
I'm just compiling from source as an exercise for my job. I have to do numerous packages for DB2 and WAS, and I'm trying to get situated with examining errors from source compile. Not all of the package RPMs will run, I will have to compile from source at some point.

The version of source GNU dbg is 7.6 (gdb-7.6.tar.gz). I am using the gcc compiler, it is version 4.6.1

That's the latest version. Are you running the "./configure" with any options? What hardware are you compiling for, and what version of AIX?

MarkBurke 07-11-2013 03:08 PM

No options to configure, currently

The Hardware is a P550. Target: powerpc-ibm-aix7.1.0.0.
# oslevel -s
7100-00-01-1037

NevemTeve 07-11-2013 04:34 PM

Remove every -Werror from bfd/Makefile. This option can be useful for the developers, but meaningless for the end-users.

NevemTeve 07-12-2013 03:10 AM

you could also try to change line 730 in bfd.c:
Code:

old:  putc ('\n', stderr);
new: (void)putc ('\n', stderr);


MarkBurke 07-12-2013 12:46 PM

Removing -Werror from the Makefile worked! Thank you so much.

Now I have a different challenge that I am learning to handle.
-------
# make
....success
# make install
....done
# gdb
exec(): 0509-036 Cannot load program powerpc64-ibm-aix6.1.2.0-gdb because of the following errors:
0509-130 Symbol resolution failed for powerpc64-ibm-aix6.1.2.0-gdb because:
0509-136 Symbol XML_StopParser (number 258) is not exported from
dependent module /opt/freeware/lib/libexpat.a[libexpat.so.0].
0509-192 Examine .loader section symbols with the
'dump -Tv' command.
# dump -Tv /opt/freeware/lib/libexpat.a | grep XML_StopParser
[32] 0x20004430 .data EXP DS SECdef [noIMid] XML_StopParser

So the export is there, but the error message show that it thinks the export is not loaded. Thanks for taking a look at this...

NevemTeve 07-12-2013 01:30 PM

I might be able to look at it on Monday; you could also try to investigate, eg:

Code:

which gdb
ls -l $(which gdb)
file $(which gdb)
dump -H $(which gdb)
dump -Tv $(which gdb) | grep XML_StopParser


NevemTeve 07-15-2013 02:58 AM

Code:

$ dump -Tv /usr/local/bin/gdb | grep XML_StopParser
[281]  0x00000000    undef      IMP    DS EXTref /usr/local/lib/libexpat.so.1 XML_StopParser

$ dump -Tv /usr/local/lib/libexpat.so.1 | grep XML_StopParser
[75]    0x20004538    .data      EXP    DS  Ldef        [noIMid] XML_StopParser


Michael AM 07-24-2013 04:00 PM

I have a package posted on SourceForge I named "buildaix". It is still "beta" in that there are many things that need to be added, but the idea is that you install it (it is packaged as an installp package) and it's required tool bos.adt.insttools (for the AIX mkinstallp command).

What it does for you - calls ./configure with arguments I have found to work well with many GNU based opensource packages; calls make; make install (to /var/tmp/root/project-1.2.3.4) and makes an installp package from that.

Why installp? Because I know the command very very well (for installs) and was having issues with .spec files and other RPM requirements. Take a peek and decide which direction you wish to go. "make install" and/or tarball installations are not going to support good system administration/management.

I would also recommend installing the coreutils package for the "install" command. "GNU project" DESTDIR=/some/where/else make install will frequently fail when using POSIX or BSD install available on AIX (snif).

Since you are compiling packages - I will not bother saying where I have one (old by now I expect) pre-built for AIX 5.3 and later.

Good Luck


All times are GMT -5. The time now is 06:45 PM.