After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 167688 - Please use "sh -c" to call external binaries in gtkdoc-scanobj
Please use "sh -c" to call external binaries in gtkdoc-scanobj
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.3
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2005-02-17 10:08 UTC by Loïc Minier
Modified: 2005-09-15 14:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
prepend sh -c to system() calls in gtkdoc-scanobj (751 bytes, patch)
2005-02-17 10:09 UTC, Loïc Minier
none Details | Review

Description Loïc Minier 2005-02-17 10:08:23 UTC
Version details: Debian
Distribution/Version: Debian/sid

Hi,

When the ".c" compiled by gtkdoc-scanobj is built correctly but can not be run
(for example because it segfaults, or the libraries are not available, or it
isn't executable etc.), you can not easily diagnose it.

We got the problem in debian in the following build-log :
http://buildd.debian.org/fetch.php?&pkg=libbonobo&ver=2.8.1-1&arch=ia64&stamp=1108514028&file=log&as=raw

extract:
mkdir .libs
 cc -g -Wall -O2 -g -Wall -O2 -DGNOMELOCALEDIR=/usr/share/locale -DORBIT2=1
-pthread -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I../.. -I../.. -c libbonobo-scan.c  -fPIC -DPIC -o
.libs/libbonobo-scan.o
libbonobo-scan.c: In function `get_object_types':
libbonobo-scan.c:18: warning: implicit declaration of function
`bonobo_running_context_get_type'
libbonobo-scan.c:21: warning: implicit declaration of function
`bonobo_moniker_extender_get_type'
libbonobo-scan.c:26: warning: implicit declaration of function
`bonobo_item_handler_get_type'
libbonobo-scan.c:29: warning: implicit declaration of function
`bonobo_shlib_factory_get_type'
 cc -g -Wall -O2 -g -Wall -O2 -DGNOMELOCALEDIR=/usr/share/locale -DORBIT2=1
-pthread -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I../.. -I../.. -c libbonobo-scan.c -o
libbonobo-scan.o >/dev/null 2>&1
cc -g -Wall -O2 -o .libs/libbonobo-scan .libs/libbonobo-scan.o
-Wl,--export-dynamic  ../../bonobo/.libs/libbonobo-2.so
/build/buildd/libbonobo-2.8.1/bonobo-activation/.libs/libbonobo-activation.so
-pthread /usr/lib/libORBitCosNaming-2.so /usr/lib/libORBit-2.so
/usr/lib/libpopt.so -lm /usr/lib/libgmodule-2.0.so -ldl
/usr/lib/libgobject-2.0.so /usr/lib/libgthread-2.0.so -lpthread
/usr/lib/libglib-2.0.so 
creating libbonobo-scan
Scan failed
make[5]: *** [scan-build.stamp] Error 255
make[5]: Leaving directory `/build/buildd/libbonobo-2.8.1/doc/api'

I'll attach a patch to add a "sh -c" part to system() calls in Perl, which will
have this effect:
bee% perl -e 'system("./foo");'
bee% perl -e 'system("sh -c ./foo");'
sh: ./foo: Permission non accordée
Comment 1 Loïc Minier 2005-02-17 10:09:01 UTC
Created attachment 37585 [details] [review]
prepend sh -c to system() calls in gtkdoc-scanobj
Comment 2 Loïc Minier 2005-02-17 11:45:59 UTC
Make that a "sh -c -x" when you commit the change.  :p
Comment 3 Damon Chaplin 2005-09-15 13:05:23 UTC
I tried this:

  $command = "sh -c -x $CC $CFLAGS -c -o $o_file $MODULE-scan.c && $LD -o
              $MODULE-scan $o_file $LDFLAGS";

but it doesn't work. It runs a shell.

I've made it more verbose though. It now outputs messages about compiling,
linking and running the scanner. Hopefully that is enough.
Comment 4 Loïc Minier 2005-09-15 13:19:46 UTC
It's: sh -x -c

(-x is just a flag to do the equivalent of "set -x")
Comment 5 Damon Chaplin 2005-09-15 13:47:56 UTC
I'll use "sh -c" to run the scanner, but I'm not really convinced the other
changes help much.
Comment 6 Loïc Minier 2005-09-15 14:24:06 UTC
(Perfect, the goal was to see build messages such as "segfault" in build logs on
remote machines, and this will now be the case.)