Re: error in building a RPM file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 21, 2012 at 8:38 AM, Ranjan Maitra <maitra@xxxxxxxxxxx> wrote:
> So, I ran this, but I still continue to get the same error:
>
> $ rpmbuild -bb peksystray.spec
[SNIP]
> + ./configure --host=x86_64-unknown-linux-gnu
> --build=x86_64-unknown-linux-gnu --program-prefix= --prefix=/usr
> --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
> --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include
> --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var
> --sharedstatedir=/var/lib --mandir=/usr/share/man
> --infodir=/usr/share/info
[SNIP]
> checking for X... no
> configure: error: X development libraries not found
> error: Bad exit status from /var/tmp/rpm-tmp.BCUTdT (%build)
>
> RPM build errors:
>    Bad exit status from /var/tmp/rpm-tmp.BCUTdT (%build)
>
>
> I don't understand why the X development errors are not found, yet I am
> able to compile just fine.....for comparison sake, I get, when I
> do ./configure manually:
>
> $./configure
[SNIP]
> checking for X... libraries , headers

Ok, although when you run it manually it seems to work, I think this
is a bug in their configure setup because it doesn't actually say
where the X libraries are found. When I ran configure manually on my
machine I correctly got:

checking for X... libraries /usr/lib64, headers

where your's shows (even when it "works"):

checking for X... libraries , headers

Since I don't know what packages you have installed I have to guess
that maybe you have the i686 X devel packaged installed but not the
x86_64 package. Make sure you have the x86_64 (64bit) libX11-devel
package installed.

One major difference between the two methods is the %configure macro
adds a lot of options to configure that you didn't add manually.

> The above is on a 64-bit machine. On a 32-bit machine, with the above
> spec (as well as the old one), I get:
>
>
> $ rpmbuild -bb peksystray.spec
[SNIP]
> + ./configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu
> --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
> --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
> --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec
> --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man
> --infodir=/usr/share/info checking for a BSD-compatible
[SNIP]
> checking for X... libraries /usr/lib, headers

Notice it pickes up /usr/lib on this one.


> + make -j2
> make  all-recursive
> make[1]: Entering directory
> `/home/maitra/rpmbuild/BUILD/peksystray-0.4.0' Making all in src
> make[2]: Entering directory
> `/home/maitra/rpmbuild/BUILD/peksystray-0.4.0/src' if gcc
> -DHAVE_CONFIG_H -I. -I. -I..     -O2 -g -march=i386 -mtune=i686  -MT
> peksystray.o -MD -MP -MF ".deps/peksystray.Tpo" -c -o peksystray.o
> peksystray.c; \ then mv -f ".deps/peksystray.Tpo"
> ".deps/peksystray.Po"; else rm -f ".deps/peksystray.Tpo"; exit 1; fi
> gcc  -O2 -g -march=i386 -mtune=i686   -L/usr/lib  -lSM -lICE -lX11  -o
> peksystray  peksystray.o /usr/lib /usr/lib: file not recognized: Is a
> directory collect2: ld returned 1 exit status make[2]: *** [peksystray]
> Error 1 make[2]: Leaving directory
> `/home/maitra/rpmbuild/BUILD/peksystray-0.4.0/src' make[1]: ***
> [all-recursive] Error 1 make[1]: Leaving directory
> `/home/maitra/rpmbuild/BUILD/peksystray-0.4.0' make: *** [all] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.2bm2uj (%build)

For some reason as configured it looks like it's trying to install the
output directly info /usr/lib which of course it can't (unless you run
this as root, and DON'T DO THAT!) and shouldn't.

Although it's not a guideline because there are people on both sides
of the issue, it's often recommended not to use the configure that
comes pre-built with the source but to run autoreconf. This fixed the
problem for me. I've added it to the spec file.

Now everything builds fine for me.

On a side note you don't need to BuildRequire: gcc since it's
considered a base requirement (in mock or koji)

http://dl.dropbox.com/u/34775202/peksystray.spec

Richard
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux