g++ and gprof
Folks, I'm trying to use gprof on one of my programs and so I'm compiling with g++ and the -pg option. However, it tells me that '/usr/bin/ld: cannot find -lstdc++_p'. How do I install libraries that support profiling? Or is there another way to solve this issue? I'm running FreeBSD 7.0 release. Thanks, Mark _ Helping your favorite cause is as easy as instant messaging. You IM, we give. http://im.live.com/Messenger/IM/Home/?source=text_hotmail_join___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: g++ and gprof
On Friday 07 March 2008, Mark Voortman wrote: Folks, I'm trying to use gprof on one of my programs and so I'm compiling with g++ and the -pg option. However, it tells me that '/usr/bin/ld: cannot find -lstdc++_p'. How do I install libraries that support profiling? Or is there another way to solve this issue? I'm running FreeBSD 7.0 release. Thanks, Mark Rebuild/reinstall world, and make sure WITHOUT_PROFILE= isn't specified in src.conf. -- Pieter de Goeje ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: g++ and gprof
From: [EMAIL PROTECTED] To: freebsd-questions@freebsd.org Subject: Re: g++ and gprof Date: Fri, 7 Mar 2008 15:52:04 +0100 CC: [EMAIL PROTECTED] On Friday 07 March 2008, Mark Voortman wrote: Folks, I'm trying to use gprof on one of my programs and so I'm compiling with g++ and the -pg option. However, it tells me that '/usr/bin/ld: cannot find -lstdc++_p'. How do I install libraries that support profiling? Or is there another way to solve this issue? I'm running FreeBSD 7.0 release. Thanks, Mark Rebuild/reinstall world, and make sure WITHOUT_PROFILE= isn't specified in src.conf. -- Pieter de Goeje Oops, they are just on the FreeBSD cd. Thanks for your reply! Mark _ Need to know the score, the latest news, or you need your Hotmail®-get your fix. http://www.msnmobilefix.com/Default.aspx___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: gprof
Any Ideas ? On 4/19/06, Alexandre Biancalana [EMAIL PROTECTED] wrote: Hi list, I'm trying to compile my C application with gprof but it is not working. This is a multithreaded program that use mysql and openssl libraries. Reading the man page I see that is need add -pg to the compile command line, but when a do this the following error occurs at linking time $ gcc -L/usr/local/lib/mysql -Wall -I. -I.. -I/usr/local/include/mysql -o serverd ../log.o ../mem.o ../misc.o ../threads_wrapper.o ../openssl.o db.o main.o request.o ssl_server.o ssl_socket.o threads.o threads_control.o -pthread -lmysqlclient_r -lssl -pg /lib/libcrypto.so.4: undefined reference to `sysconf' /lib/libcrypto.so.4: undefined reference to `times' /lib/libz.so.3: undefined reference to `feof' /lib/libm.so.4: undefined reference to `ldexp' /lib/libcrypto.so.4: undefined reference to `chmod' /lib/libz.so.3: undefined reference to `clearerr' /lib/libm.so.4: undefined reference to `isnan' *** Error code 1 Stop in /usr/home/ale/personal/ale_projects/works/program/server. I tried to substitute the -pg compiler flag by -lc_p, with this flag the program compile but is not linked with libc_p and don't generate the gprof output file... $ gcc -L/usr/local/lib/mysql -Wall -I. -I.. -I/usr/local/include/mysql -lc_p -o serverd ../log.o ../mem.o ../misc.o ../threads_wrapper.o ../openssl.o db.o main.o request.o ssl_server.o ssl_socket.o threads.othreads_control.o -pthread -lmysqlclient_r -lssl /usr/lib/libc.so: warning: warning: this program uses f_prealloc(), which is not recommended. $ ldd serverd serverd: libmysqlclient_r.so.14 = /usr/local/lib/mysql/libmysqlclient_r.so.14 (0x28099000) libssl.so.4 = /usr/lib/libssl.so.4 (0x280ed000) libpthread.so.2 = /usr/lib/libpthread.so.2 (0x2811b000) libc.so.6 = /lib/libc.so.6 (0x2814) libcrypto.so.4 = /lib/libcrypto.so.4 (0x28217000) libcrypt.so.3 = /lib/libcrypt.so.3 (0x28309000) libm.so.4 = /lib/libm.so.4 (0x28321000) libz.so.3 = /lib/libz.so.3 (0x28337000) This is my system: FreeBSD Cruel 6.0-STABLE FreeBSD 6.0-STABLE #0: Tue Jan 3 15:40:07 UTC 2006 [EMAIL PROTECTED]:/usr/src/sys/i386/compile/CRUEL i386 Any ideas ? Best Regards, Alexandre Biancalana ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
gprof
Hi list, I'm trying to compile my C application with gprof but it is not working. This is a multithreaded program that use mysql and openssl libraries. Reading the man page I see that is need add -pg to the compile command line, but when a do this the following error occurs at linking time $ gcc -L/usr/local/lib/mysql -Wall -I. -I.. -I/usr/local/include/mysql -o serverd ../log.o ../mem.o ../misc.o ../threads_wrapper.o ../openssl.o db.o main.o request.o ssl_server.o ssl_socket.o threads.o threads_control.o -pthread -lmysqlclient_r -lssl -pg /lib/libcrypto.so.4: undefined reference to `sysconf' /lib/libcrypto.so.4: undefined reference to `times' /lib/libz.so.3: undefined reference to `feof' /lib/libm.so.4: undefined reference to `ldexp' /lib/libcrypto.so.4: undefined reference to `chmod' /lib/libz.so.3: undefined reference to `clearerr' /lib/libm.so.4: undefined reference to `isnan' *** Error code 1 Stop in /usr/home/ale/personal/ale_projects/works/program/server. I tried to substitute the -pg compiler flag by -lc_p, with this flag the program compile but is not linked with libc_p and don't generate the gprof output file... $ gcc -L/usr/local/lib/mysql -Wall -I. -I.. -I/usr/local/include/mysql -lc_p -o serverd ../log.o ../mem.o ../misc.o ../threads_wrapper.o ../openssl.o db.o main.o request.o ssl_server.o ssl_socket.o threads.o threads_control.o -pthread -lmysqlclient_r -lssl /usr/lib/libc.so: warning: warning: this program uses f_prealloc(), which is not recommended. $ ldd serverd serverd: libmysqlclient_r.so.14 = /usr/local/lib/mysql/libmysqlclient_r.so.14 (0x28099000) libssl.so.4 = /usr/lib/libssl.so.4 (0x280ed000) libpthread.so.2 = /usr/lib/libpthread.so.2 (0x2811b000) libc.so.6 = /lib/libc.so.6 (0x2814) libcrypto.so.4 = /lib/libcrypto.so.4 (0x28217000) libcrypt.so.3 = /lib/libcrypt.so.3 (0x28309000) libm.so.4 = /lib/libm.so.4 (0x28321000) libz.so.3 = /lib/libz.so.3 (0x28337000) This is my system: FreeBSD Cruel 6.0-STABLE FreeBSD 6.0-STABLE #0: Tue Jan 3 15:40:07 UTC 2006 [EMAIL PROTECTED]:/usr/src/sys/i386/compile/CRUEL i386 Any ideas ? Best Regards, Alexandre Biancalana ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
gprof does not output flat profile
Hello. As from subject: I've compiled and linked everything with -pg (ad I do on other platforms), I get the call graph, but in the flat profile I only get None. Any hint? bye Thanks av. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: gprof
Rong-En Fan [EMAIL PROTECTED] writes: few questions about usr.bin/gprof 1. is this one from the old BSD, right? Yes. 2. why not have a devel/gprof port for GNU's gprof? No reason not to. Feel free to submit it. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
gprof
[ please Cc'ed me, thanks] Hello, few questions about usr.bin/gprof 1. is this one from the old BSD, right? 2. why not have a devel/gprof port for GNU's gprof? Thanks, rafan ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]