[SailfishDevel] Fwd: Fwd: mb gives error sb2: Error: Invalid target specified, aborting.: Part 3

2013-04-22 Thread christopher . lamb

Hi All

Maybe a glimmer of light at the end of the tunnel.

I have found which instance of sb2 is being called (/usr/bin/sb2), and  
have have extended the exit_error() function to give a little more  
info. I now get the following error output:


[root@SailfishSDK Demo2]# mb build -t SailfishOS-i486-x86 rpm/Demo2.spec
Building rpm/Demo2.spec for SailfishOS-i486-x86
Checking dependencies...
sb2: Error: Invalid target specified, aborting. Deep Shit!
current directory is:  /home/mersdk/SailfishProjects/Demo2/Demo2
script is : /usr/bin/sb2
target is: SailfishOS-i486-x86
file being looked for at: /root/.scratchbox2/SailfishOS-i486-x86/sb2.config
Setting up temporary specfile for Demo2 from rpm/Demo2.spec
rsyncing source...
run rpmbuild
sb2: Error: Invalid target specified, aborting. Deep Shit!
current directory is:  /home/mersdk/SailfishProjects/Demo2/Demo2
script is : /usr/bin/sb2
target is: SailfishOS-i486-x86
file being looked for at: /root/.scratchbox2/SailfishOS-i486-x86/sb2.config

The problem seems to be that ether:
a) /root/.scratchbox2/SailfishOS-i486-x86/sb2.config is missing or
b) sb2 is looking for this file in the wrong place

An ls of /root gives me:

[root@SailfishSDK Demo2]# ls -l -A //root
total 32
-rw--- 1 root root  510 2013-04-21 13:34 .bash_history
-rw-r--r-- 1 root root   24 2012-01-25 19:08 .bash_logout
-rw-r--r-- 1 root root  191 2012-01-25 19:08 .bash_profile
-rw-r--r-- 1 root root  176 2012-01-25 19:08 .bashrc
-rw-r--r-- 1 root root  100 2012-01-25 19:08 .cshrc
drwxr-xr-x 4 root root 4096 2013-04-21 14:31 rpmbuild
-rw-r--r-- 1 root root  129 2012-01-25 19:08 .tcshrc
-rw--- 1 root root  963 2013-03-28 15:19 .viminfo
[root@SailfishSDK Demo2]#

No sign here of a .scratchbox2 directory


Grüsse

Chris

---BeginMessage---

Hi all

a partial answer to my own question:

Having found the source of mb here:
https://github.com/mer-tools/sdk-setup/blob/master/src/mb

I think it is failing at the line:
grep --color=never BuildRequires $SPEC | sed -e '/^#.*$/d' | gawk  
-F: '{ print $2 }' | tr ',' ' ' | xargs sb2 -t $TARGET -m  
sdk-install -R zypper in rpm-build


Taking that to pieces, it looks like sb2 is being passed the following:
pkgconfig(QtCore) = 4.8.0 from grep et al.

Next I need to read the sb2 script to work out what is going on  / wrong.

Grüsse

Chris

[Anhang entfernt: Ehemaliger Anhangstyp: message/rfc822, Name: 
Weitergeleitete Nachricht: mb gives error sb2: Error: Invalid target 
specified, aborting.]---End Message---
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Fwd: Fwd: mb gives error sb2: Error: Invalid target specified, aborting.: Part 3

2013-04-22 Thread David Greaves
Hi Chris


On 22/04/13 09:16, christopher.l...@thurweb.ch wrote:
 The problem seems to be that ether:
 a) /root/.scratchbox2/SailfishOS-i486-x86/sb2.config is missing or
 b) sb2 is looking for this file in the wrong place

or ... :)

Well found and you are actually 100% correct with a) however you should be
building as the mersdk user. This is not terribly clear in the docs; in general
root is only used for admin tasks like system software installation.

The mersdk user is 'you'; we don't know in advance what your username will be
and it could contain spaces etc so the (usually hidden) mersdk username is used
inside the build engine. The mersdk home directory is mapped to your home 
directory.

ie /home/mersdk/.scratchbox2/SailfishOS-i486-x86/sb2.config should be present in
the build engine and should correspond to
~/.scratchbox2/SailfishOS-i486-x86/sb2.config in the host machine.

ssh -p   -i ~/.ssh/mer-qt-creator-rsa  mersdk@localhost

You *may* have problems with permissions in which case you may need to login as
root and run make distclean in your project.

David

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Fwd: Fwd: mb gives error sb2: Error: Invalid target specified, aborting.: Part 3

2013-04-22 Thread David Greaves
On 22/04/13 20:18, christopher.l...@thurweb.ch wrote:
 Hi David
 
 I am a microstep further ...8-)
 
 logged as mersdk, and with a freshly backed Demo3 project I now get this far:
 
 Building rpm/Demo3.spec for SailfishOS-i486-x86
 Checking dependencies...
 Loading repository data...
 Reading installed packages...
 'pkgconfig(QtCore)=4.8.0' not found in package names. Trying capabilities.

That confused me too.

Rather unhelpfully it does *not* say never mind, found pkgconfig(QtCore)=4.8.0
in capabilities; all is well :)

As a test, I changed it to 4.9.0 and got:

'pkgconfig(QtCore)=4.9.0' not found in package names. Trying capabilities.
No provider of 'pkgconfig(QtCore) = 4.9.0' found.

So that's what it would say if it had a problem.

 error: Bad owner/group: /home/mersdk/rpmbuild/SOURCES/Demo3.tar.bz2

Lets try cleaning up:

cd your app dir

Then:

rm -rf /home/mersdk/rpmbuild/*
sudo chown -R mersdk:mersdk .

And build:

mb build -t SailfishOS-i486-x86 rpm/Demo3.spec

David

___
SailfishOS.org Devel mailing list