Author Topic: Best way to update GDB to 7.1 in PCLinuxOS 2010  (Read 3512 times)

igguk

  • Guest
Best way to update GDB to 7.1 in PCLinuxOS 2010
« on: May 14, 2010, 04:44:46 AM »
Hi I am just a newbie in the Linux Camp just installed PCLinuxOS 2010 one week ago and so far I am very pleased with the Distro and I am planning to use it as my main Desktop OS from now on.Just a quick question, as I am interested in programming in C++ I downloaded and installed KDevelop from the repositories and is working fine, but when trying to debugging a program is asking me to have GDB version  above 7.0 and the current version shipped with PCLinuxOS 2010 is 6.3, and eventhough I changed repositories in synaptic it seems I cant find it.
Is there a way to easy install it (another repositories) without having to get it from the GDB site and compile it in my machine?
Thanks in advance and keep up the good work.

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15310
  • ┌∩┐(◕_◕)┌∩┐
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #1 on: May 14, 2010, 04:50:09 AM »
Hi igguk - big welcome to the forum. Very pleased you've decided to use PCLinuxOS.

Have a read here about updating/requesting packages.

http://www.pclinuxos.com/forum/index.php/topic,55384.0.html
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

igguk

  • Guest
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #2 on: May 14, 2010, 05:59:59 AM »
Thanks menotu for the quickly answer, seems like I will have to request it then.

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15310
  • ┌∩┐(◕_◕)┌∩┐
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #3 on: May 14, 2010, 07:46:49 AM »
Thanks menotu for the quickly answer, seems like I will have to request it then.

They are usually very good with package requests - on occasions I've even seen packages being requested and updated to the repo the very same day, BUT I'm not saying that will happen here  ;)  ;D

If you follow the package request rules - and the app(s) can be packaged into an rpm - you shouldn't have any problems.

Good luck
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

igguk

  • Guest
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #4 on: May 27, 2010, 01:24:17 PM »
As I think it might be people interested I just installed it no problems just following the readme instructions:
From the command line and login as ROOT:
./configure
make
make install
cheers

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3995
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #5 on: May 27, 2010, 05:02:33 PM »
Welcome to the forum, igguk. What you have done is not recommended because Synaptic (the package manager) will not know about this application and may well break it in a future upgrade. However, as you are a programmer, and as you found it easy to install and compile something from source just by reading the instructions that came with it, I suspect you will be able to cope if that happens.

When you have 10 posts you will be able to request packages, which is the best way to get them, or you might prefer to head over to the packagers section and learn how to build packages for pclos yourself. If you want to share any of your creations with the rest of the community that will be an invaluable skill.

Anyway, I hope you enjoy what you find here.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

igguk

  • Guest
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #6 on: May 28, 2010, 01:21:46 AM »
Hi kjpetrie, I am aware about what you say thats why i first posted  ;), i did request the package about one week ago, but I understand people is busy so is still not available in the repositories, I just posted it because this thread is the first one that pop-ups if you type in google: pclinuxos gdb, so just wanted to share with people that works if you follow the instructions... I might say that i forgot to add in my post that I did a complete removal of GDB from synaptyc before installing as it seems GDB is and standalone package regarding dependencies so it did not seem to be a very dangerous think to do.
I will have a look to learn how to build packages to see if I can help.
Very happy with pclinuxos so far.

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12524
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #7 on: May 28, 2010, 01:32:36 AM »
I hope it works for you without issue. I've been looking at the package but wonder why Fedora and Mandriva have all of these patches for 7.1.

gdb-6.3-attach-see-vdso-test.patch
gdb-6.3-bt-past-zero-20051201.patch
gdb-6.3-bz140532-ppc-unwinding-test.patch
gdb-6.3-bz202689-exec-from-pthread-test.patch
gdb-6.3-bz231832-obstack-2gb.patch
gdb-6.3-focus-cmd-prev-test.patch
gdb-6.3-framepczero-20040927.patch
gdb-6.3-gcore-thread-20050204.patch
gdb-6.3-gstack-20050411.patch
gdb-6.3-ia64-gcore-page0-20050421.patch
gdb-6.3-ia64-gcore-speedup-20050714.patch
gdb-6.3-ia64-info-frame-fix-20050725.patch
gdb-6.3-ia64-sigill-20051115.patch
gdb-6.3-ia64-sigtramp-frame-20050708.patch
gdb-6.3-inferior-notification-20050721.patch
gdb-6.3-inheritance-20050324.patch
gdb-6.3-inheritancetest-20050726.patch
gdb-6.3-large-core-20051206.patch
gdb-6.3-mapping-zero-inode-test.patch
gdb-6.3-ppc64displaysymbol-20041124.patch
gdb-6.3-ppc64syscall-20040622.patch
gdb-6.3-ppcdotsolib-20041022.patch
gdb-6.3-readnever-20050907.patch
gdb-6.3-rh-dummykfail-20041202.patch
gdb-6.3-rh-testlibunwind-20041202.patch
gdb-6.3-security-errata-20050610.patch
gdb-6.3-step-thread-exit-20050211-test.patch
gdb-6.3-terminal-fix-20050214.patch
gdb-6.3-test-dtorfix-20050121.patch
gdb-6.3-test-movedir-20050125.patch
gdb-6.3-test-pie-20050107.patch
gdb-6.3-test-self-20050110.patch
gdb-6.3-threaded-watchpoints2-20050225.patch
gdb-6.5-BEA-testsuite.patch
gdb-6.5-bz109921-DW_AT_decl_file-test.patch
gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
gdb-6.5-bz190810-gdbserver-arch-advice.patch
gdb-6.5-bz203661-emit-relocs.patch
gdb-6.5-bz216711-clone-is-outermost.patch
gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
gdb-6.5-bz243845-stale-testing-zombie-test.patch
gdb-6.5-dwarf-stack-overflow.patch
gdb-6.5-gcore-buffer-limit-test.patch
gdb-6.5-gcore-i386-on-amd64.patch
gdb-6.5-ia64-libunwind-leak-test.patch
gdb-6.5-last-address-space-byte-test.patch
gdb-6.5-missed-trap-on-step-test.patch
gdb-6.5-readline-long-line-crash.patch
gdb-6.5-readline-long-line-crash-test.patch
gdb-6.5-section-num-fixup-test.patch
gdb-6.5-sharedlibrary-path.patch
gdb-6.5-tls-of-separate-debuginfo.patch
gdb-6.6-buildid-locate-core-as-arg.patch
gdb-6.6-buildid-locate.patch
gdb-6.6-buildid-locate-rpm.patch
gdb-6.6-bz225783-gdb-debuginfo-paths.patch
gdb-6.6-bz225783-prelink-path.patch
gdb-6.6-bz229517-gcore-without-terminal.patch
gdb-6.6-bz230000-power6-disassembly-test.patch
gdb-6.6-bz235197-fork-detach-info.patch
gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
gdb-6.6-bz247354-leader-exit-fix.patch
gdb-6.6-bz247354-leader-exit-test.patch
gdb-6.6-gcore32-test.patch
gdb-6.6-readline-system.patch
gdb-6.6-scheduler_locking-step-is-default.patch
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
gdb-6.6-step-thread-exit.patch
gdb-6.6-testsuite-timeouts.patch
gdb-6.6-threads-static-test.patch
gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch
gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
gdb-6.7-charsign-test.patch
gdb-6.7-kernel-headers-compat.patch
gdb-6.7-ppc-clobbered-registers-O2-test.patch
gdb-6.7-testsuite-stable-results.patch
gdb-6.7-testsuite-stable-results-prelink.patch
gdb-6.8-attach-signalled-detach-stopped.patch
gdb-6.8-bz254229-gcore-prpsinfo.patch
gdb-6.8-bz436037-reg-no-longer-active.patch
gdb-6.8-bz442765-threaded-exec-test.patch
gdb-6.8-bz457187-largefile-test.patch*
gdb-6.8-bz466901-backtrace-full-prelinked.patch
gdb-6.8-constant-watchpoints.patch
gdb-6.8-format-security.patch
gdb-6.8-fortran-tag-constant.patch
gdb-6.8-gcc35998-ada-memory-trash.patch
gdb-6.8-glibc-headers-compat.patch
gdb-6.8-quit-never-aborts.patch
gdb-6.8-sparc64-silence-memcpy-check.patch
gdb-6.8-tui-singlebinary.patch
gdb-6.8-watchpoint-conditionals-test.patch
gdb-7.1-buildid-locate-mandriva.patch
gdb-archer-ada.patch
gdb-archer.patch
gdb-archer-pie-addons-keep-disabled.patch
gdb-archer-pie-addons.patch
gdb-bz533176-fortran-omp-step.patch
gdb-bz541866-rwatch-before-run.patch
gdb-bz562975-std-terminate-double-free.patch
gdb-bz574483-display-sepdebug.patch
gdb-bz578250-avx-01of10.patch
gdb-bz578250-avx-02of10.patch
gdb-bz578250-avx-03of10.patch
gdb-bz578250-avx-04of10.patch
gdb-bz578250-avx-05of10.patch
gdb-bz578250-avx-06of10.patch
gdb-bz578250-avx-07of10.patch
gdb-bz578250-avx-08of10.patch
gdb-bz578250-avx-09of10.patch
gdb-bz578250-avx-10of10.patch
gdb-bz578250-avx-10of10-ppc.patch*
gdb-ccache-workaround.patch
gdb-core-open-vdso-warning.patch
gdb-fix-sim-build.patch
gdb-follow-child-stale-parent.patch
gdb_format_error.patch
gdb-fortran-common.patch
gdb-fortran-common-reduce.patch
gdb-fortran-logical8.patch
gdb-infcall-sp-underflow.patch
gdb-lineno-makeup-test.patch
gdb-mdv-testversion.patch
gdb-pie-1of6-reprelinked-bin.patch
gdb-pie-2of6-reprelinked-ld.patch
gdb-pie-3of6-relocate-once.patch
gdb-pie-rerun.patch
gdb-ppc-power7-test.patch
gdb-simultaneous-step-resume-breakpoint-test.patch
gdb-solib-memory-error-nonfatal.patch
gdb-unused-revert.patch
gdb-upstream.patch
gdb-using-directive-leak.patch
gdb-x86_64-i386-syscall-restart.patch

« Last Edit: May 28, 2010, 01:34:16 AM by Texstar »

Thanks to everyone who donates. You keep the servers running.

Offline aherkey

  • Full Member
  • ***
  • Posts: 109
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #8 on: May 28, 2010, 09:40:26 PM »
Wow!  :o  That's a lot of patches. Is there any original source code left?  Except for the different architecture patches you would think that most of these would have made it up stream since version 6.3. 

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12524
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #9 on: May 28, 2010, 09:56:34 PM »
Wow!  :o  That's a lot of patches. Is there any original source code left?  Except for the different architecture patches you would think that most of these would have made it up stream since version 6.3. 


That is what I'm wondering. How many of those are really needed or required for it to work properly? Stupid package!

Thanks to everyone who donates. You keep the servers running.

Offline aherkey

  • Full Member
  • ***
  • Posts: 109
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #10 on: May 28, 2010, 10:38:06 PM »
Maybe it's time for a fresh start?   :-\   

I used to compile gdb for solaris before Sun started providing it on their freeware site. No patches needed.  It worked without any problems. I even ran it on production servers to debug core files.

Besides a programmer using it in an IDE or on the command line, how many PCLOS users would run it?

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #11 on: May 28, 2010, 10:41:33 PM »
I saw this and thought (for less than a second) about trying to do something with it.  All I can say is......

 :o  Are you freaking Crazy!   :o

I ain't touching it.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline aherkey

  • Full Member
  • ***
  • Posts: 109
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #12 on: May 30, 2010, 11:20:46 PM »
Texstar,
I see you already updated gdb to version 7.1.   8) 8) 8)

Did you get rid of all the Red Hat patches?

Just for the heck of it I created a spec file without the patches that works for me. I did add gstack and the man page from the patches though.

Code: [Select]
%define name    gdb
%define version 7.1
%define release %mkrel 1

Summary:        A GNU source-level debugger for C, C++ and Fortran
Name:           %{name}
Version:        %{version}
Release:        %{release}
License:        GPL
Group:          Development/Other
URL:            http://www.gnu.org/software/gdb/
Source:         gdb-%{version}.tar.bz2
Source1:        gdb-gstack.sh
Source2:        gdb-gstack.man

Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
PreReq:         /sbin/install-info
BuildRequires:  ncurses-devel readline-devel texinfo flex bison libpython-devel
Requires:       libexpat1 libncurses5 libreadline5 libz libpython2.5
Obsoletes:      %name < %version

%description
Gdb is a full featured, command driven debugger. Gdb allows you to
trace the execution of programs and examine their internal state at
any time.  Gdb works for C and C++ compiled with the GNU C compiler
gcc.

If you are going to develop C and/or C++ programs and use the GNU gcc
compiler, you may want to install gdb to help you debug your programs.

%prep
%setup -q

cat > gdb/version.in << EOF
%{version}-%{release} (%{product_distribution} release %{product_release})
EOF

%build
./configure                                                     \
        --prefix=%{_prefix}                                     \
        --libdir=%{_libdir}                                     \
        --sysconfdir=%{_sysconfdir}                             \
        --mandir=%{_mandir}                                     \
        --infodir=%{_infodir}                                   \
        --enable-gdb-build-warnings=,-Wno-unused                \
        --disable-werror                                        \
        --disable-sim                                           \
        --disable-rpath                                         \
        --with-system-readline                                  \
        --with-expat                                            \
        --enable-gdbtk                                          \
        --with-python                                           

%make
make info

%install
rm -rf $RPM_BUILD_ROOT
%make install DESTDIR=$RPM_BUILD_ROOT

# Fix up the info directory and files
mkdir -p $RPM_BUILD_ROOT/%{_infodir}
cp `find . -name "*.info*"` $RPM_BUILD_ROOT/%{_infodir}
rm -f $RPM_BUILD_ROOT%{_infodir}/dir $RPM_BUILD_ROOT%{_infodir}/dir.info*
rm -f $RPM_BUILD_ROOT%{_bindir}/{texindex,texi2dvi,makeinfo,install-info,info}

# These are part of binutils
rm -f $RPM_BUILD_ROOT%{_infodir}/{bfd,standard,readline,history,info,texinfo}*
rm -fr $RPM_BUILD_ROOT%{_includedir}
rm -fr $RPM_BUILD_ROOT%{_libdir}/lib{bfd*,opcodes*,iberty*}

# Remove even more unpackaged files
rm -f $RPM_BUILD_ROOT%{_libdir}/libmmalloc.a
rm -f $RPM_BUILD_ROOT%{_infodir}/{configure,libiberty,rluserman}.info*
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/
rm -f $RPM_BUILD_ROOT%{_infodir}/annotate.info*

# Copy the gstack wrapper script and man page
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/gstack
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1/gstack.1


mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
cat > $RPM_BUILD_ROOT%{_datadir}/applications/pclinuxos-%{name}.desktop << EOF
[Desktop Entry]
Name=Gdb
Comment=The GNU debugger
Exec=%{_bindir}/gdbtui
Icon=development_tools_section.png
Terminal=true
Type=Application
Categories=X-MandrivaLinux-MoreApplications-Development-Tools;Development;Debugger;
EOF

%clean
rm -fr $RPM_BUILD_ROOT

%post
%{update_menus}
%{_install_info gdb.info}
%{_install_info gdbint.info}
%{_install_info stabs.info}

%preun
if [ $1 = 0 ]; then
%{_remove_install_info gdb.info}
%{_remove_install_info gdbint.info}
%{_remove_install_info stabs.info}
fi

%postun
%clean_menus

%files
%defattr(-,root,root)
%doc COPYING COPYING.LIB README gdb/NEWS
%{_bindir}/gdb
%{_bindir}/gdbserver
%{_bindir}/gdbtui
%attr(755, root, root)%{_bindir}/gstack
%{_mandir}/man1/gdb.1*
%{_mandir}/man1/gdbtui.1*
%{_mandir}/man1/gdbserver.1*
%{_mandir}/man1/gstack.1*
%{_infodir}/gdb.info*
%{_infodir}/gdbint.info*
%{_infodir}/stabs.info*
%{_datadir}/gdb/*
%{_datadir}/applications/pclinuxos-%{name}.desktop

%changelog
* Sat May 29 2010 Andy Herkey <aherkey@gmail.com> 7.1-1pclos2010
- Clean build from scratch
- Don't need no stinkin Red Hat patches. ;^P

* Fri Nov 03 2006 Texstar <texstar@houston.rr.com> 6.3-9pclos2007
- Build for PCLinuxOS 2007


- Andy

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #13 on: May 30, 2010, 11:35:43 PM »
Besides a programmer using it in an IDE or on the command line, how many PCLOS users would run it?

It's probably still true in KDE4, but in KDE3.x, when a crash dialog came up, one of the options was to save or send the bug report to KDE. If gdb isn't installed, the crash dialog informs you to install it if you select send or save, I believe are the options. But if you mean who would use the newer version, probably just programmers.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

igguk

  • Guest
Re: Best way to update GDB to 7.1 in PCLinuxOS 2010
« Reply #14 on: June 01, 2010, 05:25:01 AM »
Hey just wanted to say thanks  :) for the update.
As people above are saying this package will be used mainly for programmers but I think that to be able to have a good/easy programming environment will benefit Linux development in all fronts, because frankly for newcomers the linux toolchain can be a bit on the hard side, anyway many thanks.
« Last Edit: June 01, 2010, 05:29:48 AM by igguk »