http://bugs.winehq.org/show_bug.cgi?id=20951
Summary: Wine cannot be compiled with -pg GCC option Product: Wine Version: 1.1.34 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: build-env AssignedTo: wine-bugs@winehq.org ReportedBy: t.artem@mailcity.com
make[1]: Entering directory `/tmp/wine-1.1.34/loader'
gcc -o wine-preloader -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c000000 preloader.o ../libs/port/libwine_port.a
preloader.o: In function `__bb_init_func': /tmp/wine-1.1.34/loader/preloader.c:162: undefined reference to `mcount' preloader.o: In function `__stack_chk_fail_local': /tmp/wine-1.1.34/loader/preloader.c:166: undefined reference to `mcount' preloader.o: In function `__stack_chk_fail': /tmp/wine-1.1.34/loader/preloader.c:167: undefined reference to `mcount' preloader.o: In function `wld_mmap': /tmp/wine-1.1.34/loader/preloader.c:276: undefined reference to `mcount' preloader.o: In function `wld_strcmp': /tmp/wine-1.1.34/loader/preloader.c:340: undefined reference to `mcount' preloader.o:/tmp/wine-1.1.34/loader/preloader.c:367: more undefined references to `mcount' follow collect2: ld returned 1 exit status make[1]: *** [wine-preloader] Error 1
http://bugs.winehq.org/show_bug.cgi?id=20951
Artem S. Tashkinov t.artem@mailcity.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |julliard@winehq.org
http://bugs.winehq.org/show_bug.cgi?id=20951
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2009-12-08 05:59:53 --- Is there any reason you are doing that? Just for fun?
http://bugs.winehq.org/show_bug.cgi?id=20951
--- Comment #2 from Artem S. Tashkinov t.artem@mailcity.com 2009-12-08 06:08:36 --- I was asked to profile an application, I decided to use gprof, because e.g. valgring is unusable.
Anyway wine built with -pg is unusable at all
$ wine any_application.exe Segmentation fault
$ gprof /opt/wine/bin/wine any_application.exe gprof: out of memory allocating 3502696144 bytes after a total of 0 bytes
Feel free to close this bug, if everyone thinks that -pg is not a proper way to profile wine.
http://bugs.winehq.org/show_bug.cgi?id=20951
--- Comment #3 from Dmitry Timoshkov dmitry@codeweavers.com 2009-12-08 06:19:22 --- Have you tried oprofile? It doesn't need any instrumentation.
http://bugs.winehq.org/show_bug.cgi?id=20951
--- Comment #4 from Artem S. Tashkinov t.artem@mailcity.com 2009-12-08 07:10:27 --- Oprifile requires special kernel options, which I don't currently have :)
http://bugs.winehq.org/show_bug.cgi?id=20951
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #5 from Dan Kegel dank@kegel.com 2009-12-16 02:02:22 --- Just don't build the preloader with those flags. (See e.g. http://www.winehq.org/pipermail/wine-devel/2005-March/034329.html ) You can build just the dll you want to profile, and it'll probably work.
On Ubuntu, you can use oprofile just fine, fwiw. I use it all the time for flat profiling of unmodified wine.
It probably would be nice to have a configure option to build wine for profiling... we tried to do something like that a while ago, but it was rejected as not being generally useful. See http://www.winehq.org/pipermail/wine-patches/2004-November/013673.html
http://bugs.winehq.org/show_bug.cgi?id=20951
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source CC| |austinenglish@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=20951
--- Comment #6 from Bruno Jesus 00cpxxx@gmail.com 2013-06-26 12:45:11 CDT --- This is still present in wine 1.6-rc3. Is this bug still relevant/valid?
http://bugs.winehq.org/show_bug.cgi?id=20951
--- Comment #7 from Dan Kegel dank@kegel.com 2013-06-26 12:52:16 CDT --- Well, yes, but it can probably be solved with a wiki page rather than a wine patch.
https://bugs.winehq.org/show_bug.cgi?id=20951
--- Comment #8 from Austin English austinenglish@gmail.com --- With wine-1.7.11, loader still fails to build with -pg. The rest of wine builds fine, however.
If loader is built with -pg and the rest of wine with, wine still runs (only tested notepad).
https://bugs.winehq.org/show_bug.cgi?id=20951
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #9 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with wine-5.12?
https://bugs.winehq.org/show_bug.cgi?id=20951
--- Comment #10 from Artem S. Tashkinov aros@gmx.com --- (In reply to joaopa from comment #9)
Does the bug still occur with wine-5.12?
It takes literally a few second to check, sigh.
make[1]: Entering directory '/tmp/wine-5.13/loader' gcc -m32 -o wine-preloader preloader.o preloader_mac.o -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7d400000 \ -Wl,-O1 -Wl,--hash-style=gnu /usr/bin/ld: preloader.o: in function `wld_vsprintf': preloader.c:(.text+0x9a): undefined reference to `mcount' /usr/bin/ld: preloader.o: in function `wld_printf': preloader.c:(.text+0x260): undefined reference to `mcount' /usr/bin/ld: preloader.o: in function `fatal_error': preloader.c:(.text+0x2ac): undefined reference to `mcount' /usr/bin/ld: preloader.o: in function `map_so_lib': preloader.c:(.text+0x30d): undefined reference to `mcount' /usr/bin/ld: preloader.o: in function `__bb_init_func': preloader.c:(.text+0x984): undefined reference to `mcount' /usr/bin/ld: preloader.o:preloader.c:(.text+0x994): more undefined references to `mcount' follow collect2: error: ld returned 1 exit status make[1]: *** [Makefile:273: wine-preloader] Error 1 make[1]: Leaving directory '/tmp/wine-5.13/loader' make: *** [Makefile:8825: loader] Error 2 make: *** Waiting for unfinished jobs.... make[1]: Entering directory '/tmp/wine-5.13/include' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/tmp/wine-5.13/include'