This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: python-gdb.py triggers compile errors on FreeBSD and Solaris
Type: compile error Stage: resolved
Components: Build Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: dmalcolm Nosy List: dmalcolm, doko, flox, loewis, r.david.murray
Priority: high Keywords: buildbot, patch

Created on 2010-04-02 10:56 by flox, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
introduce-var-for-gdb-hooks.patch dmalcolm, 2010-04-02 15:34
introduce-var-for-gdb-hooks-002.patch dmalcolm, 2010-04-05 00:15
Messages (7)
msg102155 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-04-02 10:56
The compile step fails on "python-gdb.py" on some buildbots.


# #### sparc solaris 10 gcc ####

running build_scripts
[51847 refs]
./install-sh -c  python-gdb.py
./install-sh: python-gdb.py does not exist
*** Error code 1
make: Fatal error: Command failed for target `python-gdb.py'


# #### x86 FreeBSD ####

running build_scripts
[53576 refs]
/usr/bin/install -c  python-gdb.py
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
*** Error code 64
msg102156 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-04-02 11:09
David, can you please take a look?
msg102174 - (view) Author: Dave Malcolm (dmalcolm) (Python committer) Date: 2010-04-02 15:34
Sorry about this.

I believe this is the expansion of these fragments from the Makefile.pre.in  (indenting for clarity):

    gdbhooks: $(BUILDPYTHON)-gdb.py

    $(BUILDPYTHON)-gdb.py: Tools/gdb/libpython.py
            $(INSTALL_SCRIPT) $< $(BUILDPYTHON)-gdb.py

It looks like the second of these is being invoked in both cases with "$<" as the empty string, rather than "Tools/gdb/libpython.py" (and each with their own expansion of "INSTALL_SCRIPT").

I'm guessing that the "$<" is a GNU Make-ism that isn't available on all implementations of "make".  If so, the quick fix is probably to replace "$<" with "Tools/gdb/libpython.py" in Makefile.pre.in

I'm attaching a patch which introduces a variable for the path and uses this, rather than "$<".

I only have access to Linux machines; I've tested it on one, and it works.

I don't have commit rights, so I can't fix this directly myself.

$ make -v
GNU Make 3.81

From "info make":
`$<'
     The name of the first prerequisite.  If the target got its
     commands from an implicit rule, this will be the first
     prerequisite added by the implicit rule (*note Implicit Rules::).


(In my defence, "$<" appeared to be used already in the "Some make's put the object file in the current directory" rule).


Sorry again from breaking the build on those configurations.
msg102355 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-04-04 22:35
Hmm.  The patch didn't apply to my current trunk checkout.  I'll look into why later.
msg102358 - (view) Author: Dave Malcolm (dmalcolm) (Python committer) Date: 2010-04-05 00:15
I believe $(INSTALL_SCRIPT) was changed to $(INSTALL_DATA) in r79716 (see http://bugs.python.org/issue8032#msg102288 )

Attaching refreshed version of the patch.
msg102360 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-04-05 01:42
Committed in r79778.  We'll see how the buildbots fare.
msg102405 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-04-05 20:04
The buildbots seem happy.
History
Date User Action Args
2022-04-11 14:56:59adminsetgithub: 52534
2010-04-05 20:04:02r.david.murraysetstatus: open -> closed
resolution: fixed
messages: + msg102405

stage: commit review -> resolved
2010-04-05 01:42:32r.david.murraysetmessages: + msg102360
stage: patch review -> commit review
2010-04-05 00:15:40dmalcolmsetfiles: + introduce-var-for-gdb-hooks-002.patch

messages: + msg102358
2010-04-04 22:35:27r.david.murraysetnosy: + r.david.murray
messages: + msg102355
2010-04-02 15:34:38dmalcolmsetfiles: + introduce-var-for-gdb-hooks.patch
keywords: + patch
messages: + msg102174

stage: needs patch -> patch review
2010-04-02 11:09:18loewissetassignee: dmalcolm

messages: + msg102156
nosy: + dmalcolm
2010-04-02 10:56:18floxcreate