Skip to contentSkip to conversation

Fix out of tree builds [Was: PowerTOP v2.6.1 released]

Powertop Alexandra Yates 2 participants 7 messages Jun 4, 2014 – Jun 10, 2014

lore
Share & tools
lore

Alexandra Yates

author
#0 lore raw

Hi Joerg,

Unfortunately the patches you sent don't fix the issue. Here is how to reproduced the issue:
1- Applied your patches.
2- Generated an new dist/tarball,
3- Untared on different location
4- Executed: ./autogen; ./configure; make; make clean; make

The error still points that /bin/bash: ./csstoh.sh: No such file or directory

===== Complete output ======

make all-recursive
make[1]: Entering directory `/home/magd/Downloads/powertop-2.6.1' Making all in traceevent
make[2]: Entering directory `/home/magd/Downloads/powertop-2.6.1/traceevent'

  CC     event-parse.lo
  CC     parse-filter.lo
  CC     parse-utils.lo
  CC     trace-seq.lo
  CCLD   libtraceevnet.la

make[2]: Leaving directory `/home/magd/Downloads/powertop-2.6.1/traceevent' Making all in src
make[2]: Entering directory `/home/magd/Downloads/powertop-2.6.1/src' /bin/bash ./csstoh.sh ./powertop.css css.h
/bin/bash: ./csstoh.sh: No such file or directory
make[2]: *** [css.h] Error 127
make[2]: Leaving directory `/home/magd/Downloads/powertop-2.6.1/src' make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/magd/Downloads/powertop-2.6.1'
make: *** [all] Error 2

Quoted 44 lines · Alexandra Yates
Quoted 9 lines
Quoted 7 lines · Alexandra Yates
Quoted 4 lines
Quoted 4 lines

Also it is not possible to compile it after running:

$ make clean

It seems csstoh.sh script is missing

I've had this patch in my tree for at least some months...

Can you send the patch to the mailing list?

I verified that I did attach it. For people who prefer inline patches find a regenerated version below. Btw, to find out about problems with the source: Please run "make distcheck" before doing a release - which will currently fail due to the included object files.

Ciao
Jörg

From 22a76b66041f27017de302ae5650ec973471a01a Mon Sep 17 00:00:00 2001
From: Joerg Mayer <jmpt(a)loplof.de>
Date: Sun, 1 Jun 2014 09:36:17 +0200
Subject: [PATCH] Fix out of tree builds

Signed-off-by Joerg Mayer <jmpt(a)loplof.de>
---
 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/Makefile.am +1 -2
index 0fe3c04..605f285 100644
@@ -50,5 +50,5 @@ AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS)
 $(LIBNL_LIBS) $(LIBZ_LIBS)
 BUILT_SOURCES = css.h
 CLEANFILES = css.h
 css.h: powertop.css
-	$(SHELL) ./csstoh.sh powertop.css css.h
+	$(SHELL) ${srcdir}/csstoh.sh ${srcdir}/powertop.css css.h
 
--

1.8.4.5

Quoted 5 lines

--
Joerg Mayer <jmayer(a)loplof.de>
We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology.

Thank you,
Alexandra.

#1 lore raw

Hallo Alexandra,

Quoted 7 lines · Alexandra Yates

Unfortunately the patches you sent don't fix the issue. Here is how to reproduced the issue:
1- Applied your patches.
2- Generated an new dist/tarball,
3- Untared on different location
4- Executed: ./autogen; ./configure; make; make clean; make

Quoted 5 lines

The error still points that /bin/bash: ./csstoh.sh: No such file or directory

make[2]: Entering directory `/home/magd/Downloads/powertop-2.6.1/src' /bin/bash ./csstoh.sh ./powertop.css css.h
/bin/bash: ./csstoh.sh: No such file or directory

Luckily you included your workflow - it contains a bug. As you can see the system has not picked up the new path (the text ./csstoh.sh no longer exists in the source). Correct order would be:
1- apply patches
2- ./autogen && ./configure
3- make distcheck
4- cp powertop-2.6.1.tar.gz <wherever>

Ciao
Jörg

Signature · 3 lines
Joerg Mayer                                           <jmayer(a)loplof.de>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
author
#2 lore raw

Joerg,

Quoted 26 lines

Hallo Alexandra,

Quoted 7 lines · Alexandra Yates

Unfortunately the patches you sent don't fix the issue. Here is how to reproduced the issue:
1- Applied your patches.
2- Generated an new dist/tarball,
3- Untared on different location
4- Executed: ./autogen; ./configure; make; make clean; make

Quoted 6 lines

The error still points that /bin/bash: ./csstoh.sh: No such file or directory

make[2]: Entering directory `/home/magd/Downloads/powertop-2.6.1/src' /bin/bash ./csstoh.sh ./powertop.css css.h
/bin/bash: ./csstoh.sh: No such file or directory

Luckily you included your workflow - it contains a bug. As you can see the system has not picked up the new path (the text ./csstoh.sh no longer exists
in the source). Correct order would be:
1- apply patches
2- ./autogen && ./configure
3- make distcheck
4- cp powertop-2.6.1.tar.gz <wherever>

Quoted 7 lines

Ciao
Jörg
--
Joerg Mayer <jmayer(a)loplof.de>
We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology.

I still get the error, even after following your steps. You may have other commits I don't.

Thank you,
Alexandra.

#3 lore raw

Hello Alexandra,

Quoted 3 lines · Alexandra Yates
Quoted 3 lines · Alexandra Yates
Quoted 2 lines

Unfortunately the patches you sent don't fix the issue. Here is how to reproduced the issue:

...

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

The error still points that /bin/bash: ./csstoh.sh: No such file or directory

...

Quoted 2 lines

I still get the error, even after following your steps. You may have other commits I don't.

I don't have any other patches applied (the only differences result from my patches and some regenerated files):

jmayer(a)egg:~/work/power/powertop/git(master)> git status --ignored

#       modified:   po/ca.po           <==== Automagically regenerated
#       modified:   po/cs_CZ.po        <==== (only timestamps and
#       modified:   po/de_DE.po        <==== line numbers differ. The
#       modified:   po/en_GB.po        <==== differing line numbers
#       modified:   po/en_US.po        <==== indicate that these files
#       modified:   po/es_ES.po        <==== should be regenerated before
#       modified:   po/hu_HU.po        <==== doing a distribution as well)
#       modified:   po/id_ID.po
#       modified:   po/nl_NL.po
#       modified:   po/powertop.pot
#       modified:   po/zh_TW.po
#       modified:   src/Makefile.am    <==== My changes

And git diff for src/Makefile.am only shows my two changes.

Quoted 1 line

From the top of your git directory please run

grep -r \\./csstoh.sh .
If something is found, delete it. Even better (assuming you have no extra directories in your source tree that are not checked in and not worth keeping): Please run "git clean -dfX" from the top of your git tree. Verify that the changes are applied ("git diff src/Makefile.am"). Then rebuild.

I'm very sure that my tree is clean as I do development in branches:
jmayer(a)egg:~/work/power/powertop/git(master)> git branch
* master
out-of-tree-build-fix
tuning-packaging-fix
I tested my patches on top of master to make sure I work on a pristine source tree.

I'm a) quite sure it's something in your setup/workflow and b) quite determined to find out what it going wrong there if you are willing to let me :)

OK, I've written a small script that tries to insure that things are build correctly - please try (note that it will run "git clean -dfX").

Thanks
Jörg

Signature · 3 lines
Joerg Mayer                                           <jmayer(a)loplof.de>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
#4 lore raw

[Resend, this time with the script inlined as Intel's virus checker rejected the .sh attachment]

Hello Alexandra,

Quoted 3 lines · Alexandra Yates
Quoted 3 lines · Alexandra Yates
Quoted 2 lines

Unfortunately the patches you sent don't fix the issue. Here is how to reproduced the issue:

...

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

The error still points that /bin/bash: ./csstoh.sh: No such file or directory

...

Quoted 2 lines

I still get the error, even after following your steps. You may have other commits I don't.

I don't have any other patches applied (the only differences result from my patches and some regenerated files):

jmayer(a)egg:~/work/power/powertop/git(master)> git status --ignored

#       modified:   po/ca.po           <==== Automagically regenerated
#       modified:   po/cs_CZ.po        <==== (only timestamps and
#       modified:   po/de_DE.po        <==== line numbers differ. The
#       modified:   po/en_GB.po        <==== differing line numbers
#       modified:   po/en_US.po        <==== indicate that these files
#       modified:   po/es_ES.po        <==== should be regenerated before
#       modified:   po/hu_HU.po        <==== doing a distribution as well)
#       modified:   po/id_ID.po
#       modified:   po/nl_NL.po
#       modified:   po/powertop.pot
#       modified:   po/zh_TW.po
#       modified:   src/Makefile.am    <==== My changes

And git diff for src/Makefile.am only shows my two changes.

Quoted 1 line

From the top of your git directory please run

grep -r \\./csstoh.sh .
If something is found, delete it. Even better (assuming you have no extra directories in your source tree that are not checked in and not worth keeping): Please run "git clean -dfX" from the top of your git tree. Verify that the changes are applied ("git diff src/Makefile.am"). Then rebuild.

I'm very sure that my tree is clean as I do development in branches:
jmayer(a)egg:~/work/power/powertop/git(master)> git branch
* master
out-of-tree-build-fix
tuning-packaging-fix
I tested my patches on top of master to make sure I work on a pristine source tree.

I'm a) quite sure it's something in your setup/workflow and b) quite determined to find out what it going wrong there if you are willing to let me :)

OK, I've written a small script that tries to insure that things are build correctly - please try (note that it will run "git clean -dfX").

Thanks
Jörg

Signature · 49 lines
Joerg Mayer                                           <jmayer(a)loplof.de>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.


============================= build-release.sh ============================
#!/bin/sh

# Terminate script on error
set -e

if [ ! -d .git ]; then
  echo
  echo "Please run from top of git source tree"
  echo
  exit 1
fi

echo
echo "=========== Cleaning up source tree ================="
echo
git clean -dfX

echo
echo "=========== List of modified files =================="
echo
git status --ignored

echo
echo "=========== Setting up build environmnet ============"
echo
./autogen.sh >/dev/null
./configure >/dev/null

echo
echo "=========== Packaging source ========================"
echo
make dist >/dev/null

echo
echo "=========== Checking packaged source ================"
echo
make distcheck >/dev/null

echo
echo " All good for release"
echo

exit 0
author
#5 lore raw

Hi Joerg,

Quoted 108 lines

[Resend, this time with the script inlined as Intel's virus checker rejected
the .sh attachment]

Hello Alexandra,

Quoted 4 lines · Alexandra Yates
Quoted 2 lines · Alexandra Yates
Quoted 1 line

Unfortunately the patches you sent don't fix the issue. Here is how

to

Quoted 1 line
Quoted 1 line

reproduced the issue:

...

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

The error still points that /bin/bash: ./csstoh.sh: No such file or directory

...

Quoted 2 lines

I still get the error, even after following your steps. You may have other commits I don't.

I don't have any other patches applied (the only differences result from my patches and some regenerated files):

jmayer(a)egg:~/work/power/powertop/git(master)> git status --ignored

#       modified:   po/ca.po           <==== Automagically regenerated
#       modified:   po/cs_CZ.po        <==== (only timestamps and
#       modified:   po/de_DE.po        <==== line numbers differ. The
#       modified:   po/en_GB.po        <==== differing line numbers
#       modified:   po/en_US.po        <==== indicate that these files
#       modified:   po/es_ES.po        <==== should be regenerated before
#       modified:   po/hu_HU.po        <==== doing a distribution as well)
#       modified:   po/id_ID.po
#       modified:   po/nl_NL.po
#       modified:   po/powertop.pot
#       modified:   po/zh_TW.po
#       modified:   src/Makefile.am    <==== My changes

And git diff for src/Makefile.am only shows my two changes.

Quoted 1 line

From the top of your git directory please run

grep -r \\./csstoh.sh .
If something is found, delete it. Even better (assuming you have no extra directories in your source tree that are not checked in and not worth keeping): Please run "git clean -dfX" from the top of your git tree. Verify that the changes are applied ("git diff src/Makefile.am"). Then rebuild.

I'm very sure that my tree is clean as I do development in branches:
jmayer(a)egg:~/work/power/powertop/git(master)> git branch
* master
out-of-tree-build-fix
tuning-packaging-fix
I tested my patches on top of master to make sure I work on a pristine source tree.

I'm a) quite sure it's something in your setup/workflow and b) quite determined to find out what it going wrong there if you are willing to let me :)

OK, I've written a small script that tries to insure that things are build correctly - please try (note that it will run "git clean -dfX").

Thanks
Jörg
--
Joerg Mayer <jmayer(a)loplof.de>
We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology.

============================= build-release.sh
============================
#!/bin/sh

# Terminate script on error
set -e

if [ ! -d .git ]; then
echo
echo "Please run from top of git source tree"
echo
exit 1
fi

echo
echo "=========== Cleaning up source tree =================" echo
git clean -dfX

echo
echo "=========== List of modified files ==================" echo
git status --ignored

echo
echo "=========== Setting up build environmnet ============" echo
./autogen.sh >/dev/null
./configure >/dev/null

echo
echo "=========== Packaging source ========================" echo
make dist >/dev/null

echo
echo "=========== Checking packaged source ================" echo
make distcheck >/dev/null

Quoted 7 lines

echo
echo " All good for release"
echo

exit 0

You are correct my friend! my local repo apparently was "clean", I also use branches for dev. However, each time I will apply the patches I will get the make clean; make; errors even after your handy dandy commands. I pulled a fresh version of the repo, applied patches and that worked very well.

Thank you for your persistence :)

Alexandra.

author
#6 lore raw
Quoted 129 lines

Hi Joerg,

Quoted 112 lines

[Resend, this time with the script inlined as Intel's virus checker rejected
the .sh attachment]

Hello Alexandra,

Quoted 4 lines · Alexandra Yates
Quoted 2 lines · Alexandra Yates
Quoted 1 line

Unfortunately the patches you sent don't fix the issue. Here is how

to

Quoted 1 line
Quoted 1 line

reproduced the issue:

...

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

The error still points that /bin/bash: ./csstoh.sh: No such file or directory

...

Quoted 2 lines

I still get the error, even after following your steps. You may have other commits I don't.

I don't have any other patches applied (the only differences result from my patches and some regenerated files):

jmayer(a)egg:~/work/power/powertop/git(master)> git status --ignored

#       modified:   po/ca.po           <==== Automagically regenerated
#       modified:   po/cs_CZ.po        <==== (only timestamps and
#       modified:   po/de_DE.po        <==== line numbers differ. The
#       modified:   po/en_GB.po        <==== differing line numbers
#       modified:   po/en_US.po        <==== indicate that these files
#       modified:   po/es_ES.po        <==== should be regenerated
before
#       modified:   po/hu_HU.po        <==== doing a distribution as
well)
#       modified:   po/id_ID.po
#       modified:   po/nl_NL.po
#       modified:   po/powertop.pot
#       modified:   po/zh_TW.po
#       modified:   src/Makefile.am    <==== My changes

And git diff for src/Makefile.am only shows my two changes.

Quoted 1 line

From the top of your git directory please run

grep -r \\./csstoh.sh .
If something is found, delete it. Even better (assuming you have no extra
directories in your source tree that are not checked in and not worth keeping): Please run "git clean -dfX" from the top of your git tree. Verify that the changes are applied ("git diff src/Makefile.am"). Then rebuild.

I'm very sure that my tree is clean as I do development in branches:
jmayer(a)egg:~/work/power/powertop/git(master)> git branch
* master
out-of-tree-build-fix
tuning-packaging-fix
I tested my patches on top of master to make sure I work on a pristine source tree.

I'm a) quite sure it's something in your setup/workflow and b) quite determined to find out what it going wrong there if you are willing to let me :)

OK, I've written a small script that tries to insure that things are build
correctly - please try (note that it will run "git clean -dfX").

Thanks
Jörg
--
Joerg Mayer <jmayer(a)loplof.de>
We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology.

============================= build-release.sh
============================
#!/bin/sh

# Terminate script on error
set -e

if [ ! -d .git ]; then
echo
echo "Please run from top of git source tree"
echo
exit 1
fi

echo
echo "=========== Cleaning up source tree =================" echo
git clean -dfX

echo
echo "=========== List of modified files ==================" echo
git status --ignored

echo
echo "=========== Setting up build environmnet ============" echo
./autogen.sh >/dev/null
./configure >/dev/null

echo
echo "=========== Packaging source ========================" echo
make dist >/dev/null

echo
echo "=========== Checking packaged source ================" echo
make distcheck >/dev/null

Quoted 7 lines

echo
echo " All good for release"
echo

exit 0

You are correct my friend! my local repo apparently was "clean", I also use branches for dev. However, each time I will apply the patches I will get the make clean; make; errors even after your handy dandy commands. I pulled a fresh version of the repo, applied patches and that worked very well.

Quoted 4 lines

Thank you for your persistence :)

Alexandra.

Bizarre, it worked on my local box, but as soon as I get the tar ball into another box to make; make clean; make. The error comes back. I didn't think I needed to ./autogen.sh ./configure each time I do a make clean on a release.

Thank you,
Alexandra.