An error while making a package (UGENE).

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

An error while making a package (UGENE).

Postby zugunder » Sep 11th, '12, 19:43

Hi,

I finally dared to package a program I need from the source and I bumped into an error (maybe not the last one :-)).
It appears that something wrong with sqlite3 components, though I have installed:
Code: Select all
lib64sqlite3_0
lib64sqlite3-devel

Code: Select all
cd src/libs_3rdparty/sqlite3/ && make -f Makefile
make[1]: Entering directory `/home/grigory/rpm/BUILD/ugene-1.11.1/src/libs_3rdparty/sqlite3'
make -f Makefile.Release
make[2]: Entering directory `/home/grigory/rpm/BUILD/ugene-1.11.1/src/libs_3rdparty/sqlite3'
gcc -c -pipe -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -DPIC -fPIC -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -DPIC -fPIC -w -D_REENTRANT -fPIC -DUGENE_VERSION=1.11.1 -DUGENE_VER_MAJOR=1 -DUGENE_VER_MINOR=11 -DUGENE_VER_PATCH=1 -DUGENE_X86_64 -DUGENE_DATA_DIR=\"/usr/share/ugene/data\" -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_RTREE -DTHREADSAFE -DNDEBUG -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include -Isrc -Irelease -o _tmp/obj/release/sqlite3.o src/sqlite3.c
rm -f libugenedb.so.1.0.0 libugenedb.so libugenedb.so.1 libugenedb.so.1.0
g++ -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags -Wl,-O1 -shared -Wl,-soname,libugenedb.so.1 -o libugenedb.so.1.0.0 _tmp/obj/release/sqlite3.o   -L/usr/lib64 -L../../_release -lQtGui -L/usr/lib64 -L/usr/lib -lQtCore -lpthread 
_tmp/obj/release/sqlite3.o: In function `unixDlError':
/home/grigory/rpm/BUILD/ugene-1.11.1/src/libs_3rdparty/sqlite3/src/sqlite3.c:30426: undefined reference to `dlerror'
_tmp/obj/release/sqlite3.o: In function `unixDlSym':
/home/grigory/rpm/BUILD/ugene-1.11.1/src/libs_3rdparty/sqlite3/src/sqlite3.c:30453: undefined reference to `dlsym'
_tmp/obj/release/sqlite3.o: In function `unixDlClose':
/home/grigory/rpm/BUILD/ugene-1.11.1/src/libs_3rdparty/sqlite3/src/sqlite3.c:30457: undefined reference to `dlclose'
_tmp/obj/release/sqlite3.o: In function `unixDlOpen':
/home/grigory/rpm/BUILD/ugene-1.11.1/src/libs_3rdparty/sqlite3/src/sqlite3.c:30412: undefined reference to `dlopen'
collect2: ld returned 1 exit status
make[2]: *** [../../_release/libugenedb.so.1.0.0] Error 1
make[2]: Leaving directory `/home/grigory/rpm/BUILD/ugene-1.11.1/src/libs_3rdparty/sqlite3'
make[1]: *** [release] Error 2
make[1]: Leaving directory `/home/grigory/rpm/BUILD/ugene-1.11.1/src/libs_3rdparty/sqlite3'
make: *** [sub-src-libs_3rdparty-sqlite3-make_default-ordered] Error 2
error: Bad exit status from /home/grigory/rpm/tmp/rpm-tmp.fkmb2X (%build)


RPM build errors:
    Bad exit status from /home/grigory/rpm/tmp/rpm-tmp.fkmb2X (%build)


What could be the problem here?

P.S. Mageia1 x86_64, spec file is for the earlier version and taken from Fedora (with modifications for Mageia of course).

P.P.S. I tried to contact the Fedora packager of this program, but as of now failed to get any response.

Thank you.
Last edited by zugunder on Sep 17th, '12, 05:31, edited 1 time in total.
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: An error while making a package.

Postby tom_ » Sep 11th, '12, 20:55

zugunder wrote:/home/grigory/rpm/BUILD/ugene-1.11.1/src/libs_3rdparty/sqlite3/src/sqlite3.c:30412: undefined reference to `dlopen'
collect2: ld returned 1 exit status


the function dlopen is missing...

Code: Select all
man dlopen


suggests

Code: Select all
 Link with -ldl.
tom_
 
Posts: 423
Joined: Sep 3rd, '11, 12:26
Location: Porto Ercole, Italy

Re: An error while making a package.

Postby zugunder » Sep 11th, '12, 21:20

Sorry, I am not a pro in programming...
So does it mean that there is an error in the code (and the functions should be defined or called in the text) or that the compiler does not find the proper library with dlopen, dlerror, etc?
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: An error while making a package.

Postby MauRice » Sep 11th, '12, 21:31

Zugunder,

Starting from the spec-file from ugene-1.9.4-1.fc16.src.rpm with a little change and update to version 1.11.1
No problem compiling it:
Code: Select all
rpmbuild -ba ugene.spec --clean


Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/maurizio/src/rpm/BUILDROOT/ugene-1.11.1-2.x86_64
Wrote: /home/maurizio/src/rpm/SRPMS/ugene-1.11.1-1.mga_nl2.src.rpm
Wrote: /home/maurizio/src/rpm/RPMS/x86_64/ugene-1.11.1-1.mga_nl2.x86_64.rpm
Executing(%clean): /bin/sh -e /home/maurizio/src/rpm/tmp/rpm-tmp.0k1jq2
+ umask 022
+ cd /home/maurizio/src/rpm/BUILD
+ cd ugene-1.11.1
+ rm -rf /home/maurizio/src/rpm/BUILDROOT/ugene-1.11.1-2.x86_64
+ exit 0
Executing(--clean): /bin/sh -e /home/maurizio/src/rpm/tmp/rpm-tmp.V4dm8z
+ umask 022
+ cd /home/maurizio/src/rpm/BUILD
+ rm -rf ugene-1.11.1
+ exit 0


I haven't tested the RPM!

Spec-file:
Code: Select all
Name:    ugene
Summary: Integrated bioinformatics toolkit
Version: 1.11.1
Release: %mkrel 1
License: GPLv2+ and GPLv2
Group:   Applications/Engineering
URL:     http://ugene.unipro.ru
Source0: http://ugene.unipro.ru/downloads/%{name}-%{version}.tar.gz

Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: qt4-devel >= 4.7.0 zlib-devel desktop-file-utils
%ifarch x86_64
BuildRequires: lib64qtwebkit2.2-devel lib64x11_6-devel
%else
BuildRequires: libqtwebkit2.2-devel libx11_6-devel
%endif
#TODO Requires:  qt >= 4.7.0 qt-x11 >= 4.7.0 qt-webkit

%description
Unipro UGENE is a cross-platform visual environment for DNA and protein
sequence analysis. UGENE integrates the most important bioinformatics
computational algorithms and provides an easy-to-use GUI for performing
complex analysis of the genomic data. One of the main features of UGENE
is a designer for custom bioinformatics workflows.

%prep
%setup -q

%build
%_bindir/qmake -r \
        INSTALL_BINDIR=%{_bindir} \
        INSTALL_LIBDIR=%{_libdir} \
        INSTALL_DATADIR=%{_datadir} \
        INSTALL_MANDIR=%{_mandir}

make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make install INSTALL_ROOT=%{buildroot}
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_libdir}/%{name}/
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_datadir}/%{name}/
%{_mandir}/man1/*
%doc COPYRIGHT LICENSE

%changelog
* Tue Sep 11 2012 Maurizio Dal Magro
- Updated to version 1.11.1

* Wed Jul 20 2011 Ivan Efremov <iefremov@unipro.ru>  - 1.9.4-1
- Upstream vesrion update

* Mon Jun 14 2011 Ivan Efremov <iefremov@unipro.ru>  - 1.9.3-1
- Upstream vesrion update

* Mon Mar 28 2011 Ivan Efremov <iefremov@unipro.ru>  - 1.9.2-1
- Upstream vesrion update

* Thu Feb 09 2011 Ivan Efremov <iefremov@unipro.ru>  - 1.9.1-1
- Upstream vesrion update

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Aug 21 2010 Ivan Efremov <iefremov@unipro.ru> - 1.7.2-1
- Upstream version change

* Tue May 25 2010 Ivan Efremov <iefremov@unipro.ru> - 1.7.0-5
- Upstream version change

* Tue Mar 30 2010 Ivan Efremov <iefremov@unipro.ru> - 1.6.2-1
- Upstream version change

* Tue Feb 16 2010 Ivan Efremov <iefremov@unipro.ru> - 1.6.1-1
- Upstream version change

* Wed Dec 23 2009 Ivan Efremov <iefremov@unipro.ru> - 1.6.0-1
- Upstream version change

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Jul 17 2009 Ivan Efremov <iefremov@unipro.ru> - 1.5.1-1
- Upstream version change
- Fix for lrelease removed due to upstream package changes

* Fri Jul 10 2009 Ivan Efremov <iefremov@unipro.ru> - 1.5.0-3
- desktop-file-utils added to dependencies

* Mon Jul 06 2009 Ivan Efremov <iefremov@unipro.ru> - 1.5.0-1
- Upstream version change
- Needed Qt versions bumped up
- Fix for lrelease updated due to upstream package changes

* Tue Mar 24 2009 Ivan Efremov <iefremov@unipro.ru> - 1.4.1-1
- Upstream version change

* Fri Mar 06 2009 Ivan Efremov <iefremov@unipro.ru> - 1.4.0-1
- Upstream version change

* Mon Feb 02 2009 Ivan Efremov <iefremov@unipro.ru> - 1.3.3-1
- Initial release of rpm
MauRice
MauRice
 
Posts: 22
Joined: Mar 25th, '11, 20:52

Re: An error while making a package.

Postby doktor5000 » Sep 11th, '12, 21:43

zugunder wrote:P.P.S. I tried to contact the Fedora packager of this program, but as of now failed to get any response.


May be explained by http://pkgs.fedoraproject.org/cgit/ugen ... ad.package
This package was retired on 2012-02-06 due to lack of a maintainer.


And yes, this identifies a problem with the code, probably due to Mageia scripts and environment being more strict and ignoring less errors to improve overall code quality.
You may want to have a look at https://wiki.mageia.org/en/Packaging_pr ... _.60xxx.27
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: An error while making a package.

Postby zugunder » Sep 11th, '12, 23:11

MauRice,
Thanks for the prompt answer, but as far as I see, you built it for Mageia2... I have a slightly different set of dependencies for Mageia1 (this is the first difference):
Code: Select all
BuildRequires: lib64qt4-devel >= 4.7.0
BuildRequires: lib64x11_6-devel
BuildRequires: lib64zlib-devel
BuildRequires: desktop-file-utils
Requires:        lib64qtcore4 >= 4.7.0
Requires:        lib64qtwebkit4


The second thing, which is different, is a parameter in build section; as build.txt from the Ugene-1.11.1 source recommends for 64-bit packages, I put there:
Code: Select all
%build
%_bindir/qmake CONFIG+=x64 -r\


I also did not use a --clean option while building a package, it should not affect the result.

However (though I may be easily mistaken) it looks quite strange to me that in your case you did not have any errors, that are connected with the code itself (as doctor5000 noted in the previous message). Did you turn this check off somehow?
Last edited by zugunder on Sep 11th, '12, 23:32, edited 1 time in total.
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: An error while making a package.

Postby zugunder » Sep 11th, '12, 23:30

doktor5000,

I think I got what underlinking is, but, to put it simple, I did not understand anything from the examples of fixing this issue. As I said, I am not an expert in programming.
Is there any possibility to turn off the scripts checking for underlinking (during package building)?
Code: Select all
%build
%define _disable_ld_no_undefined 1

did not help.
Last edited by zugunder on Sep 12th, '12, 00:05, edited 1 time in total.
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: An error while making a package.

Postby doktor5000 » Sep 11th, '12, 23:56

zugunder wrote:Is there any possibility to turn off the scripts checking for underlinking (during package building)?


For those specific cases where underlinking needs to be disabled, you may need this following in specfile :

Code: Select all
%define _disable_ld_no_undefined 1

Put in anywhere in the spec - i normally put it directly at the top for clarity reasons. But does not work in every case. I'll take a look in the next days if i won't forget.
FWIW, --clean is only for automatic cleanup of BUILD and BUILDROOT directories after a package was built successfully, and does not matter here as you mentioned.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: An error while making a package.

Postby zugunder » Sep 12th, '12, 00:08

Well, I've already tried it... did not work regardless of the place where I put it.

P.S. But is there any hope to make a patch for the source code to get rid of this problem? I mean, all those crippled workarounds will fail sooner or later...
As I am using now and will use this particular program in future (quite intensively), could I be of any help as far as packaging/maintaining is concerned? Actually, I am interested in 1-2 more packages and at least one of them has never been packed as rpm, so it looks like it is high time to contribute to the distro I am using...

BTW, they have an Ubuntu package for the latest version of ugene, should be in their PPA. If it may help, I could find it.

Thank you.
Last edited by zugunder on Sep 12th, '12, 04:01, edited 1 time in total.
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: An error while making a package.

Postby tom_ » Sep 12th, '12, 01:55

zugunder wrote:Sorry, I am not a pro in programming...
So does it mean that there is an error in the code (and the functions should be defined or called in the text) or that the compiler does not find the proper library with dlopen, dlerror, etc?


the compiler does not find the proper library with dlopen, dlerror, etc.

the name of the library with the functions dlopen etc is dl
so you should add -ldl somewhere (I'm not a packager, sorry)
probably in a Makefile where you already have -lQtCore -lpthread

but is seems you have found some better solution,
good for you :)
tom_
 
Posts: 423
Joined: Sep 3rd, '11, 12:26
Location: Porto Ercole, Italy

Re: An error while making a package.

Postby zugunder » Sep 12th, '12, 04:04

but is seems you have found some better solution,
good for you :)

You mean, asking doctor5000 to take a look at it? ;)

And I do not find any -lQtCore or -ipthread in source files...
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: An error while making a package.

Postby MauRice » Sep 12th, '12, 06:11

Zugunder,

I think it has to do with sqlite3.
Even if it is not identified as a buildrequeries.
Mag1 has sqlite3 version 3.7.9
Mag2 has sqlite3 version 3.7.11

The spec-file that I used compare with the fedora:
- Updated to version 1.11.1
- Buildrequeries adapted to Mageia
- qmake-qt4 change to qmake

TODO: The Requeries, that is why that have not been tested.

The --clean option, cleans the build environment after a successful built.
MauRice
MauRice
 
Posts: 22
Joined: Mar 25th, '11, 20:52

Re: An error while making a package.

Postby zugunder » Sep 12th, '12, 18:52

MauRice,

Thank you for the explanations! It really looks like the only serious difference is the version of sqlite3...
I looked at the change log (http://sqlite.org/changes.html), but did not notice any direct references to ldl there.
I could probably try to repack sqlite3 v.3.7.11 for Mageia1 using source and spec files from Mageia2 (there are almost no differences between specs for M1 and M2 as far as I can see). Dependencies there are also the same (no package versions are specified), and, btw, there are a couple of dependencies in spec for Mageia2 that should not be there since they are required by the patch that is not applied any more...
On the other hand, some other packages will be required to repack (sqlite3-tcl, etc), so I am not sure if it worth trying to do at all, especially taking into account my lack of experience...
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: An error while making a package.

Postby zugunder » Sep 12th, '12, 23:12

2 more points here:

1. I tried to compile several older versions of Ugene (up to 1.10.1), but all of them resulted in that very same error. So I'd guess that the old version sqlite3 may not be a reason for that.

2. I re-checked the list of required dependencies and noticed that in MauRice's spec file the library lib(64)qtwebkit2.2-devel is present. But in Mageia1 only lib64qtwebkit4 is available (or libqtwebkit4), but not the developmental versions at all.

So doesn't it look like there is a problem with required dependencies?

For x86_64 build requires:

MauRice:...................................... What I have:
qt4-devel >= 4.7.0...........................lib64qt4-devel >= 4.7.0
zlib-devel........................................lib64zlib-devel
desktop-file-utils..............................desktop-file-utils
lib64x11_6-devel..............................lib64x11_6-devel
lib64qtwebkit2.2-devel......................???
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: An error while making a package.

Postby MauRice » Sep 13th, '12, 21:06

Zugunder,

The header files from Mag2 lib(64)qtwebkit2.2-devel, are in lib(64)qt4-devel with Mag1.
So this may not be the problem.

Frankly, I don't know. Why it is not possible.
MauRice
MauRice
 
Posts: 22
Joined: Mar 25th, '11, 20:52

Re: An error while making a package.

Postby zugunder » Sep 13th, '12, 23:48

Indeed, that does not seem to be a problem then...
However, I tried to build the last available Fedora version of UGENE (1.9.4) and exited with the same error in the same place.
Strangely, this Fedora build is marked July'2011 (according to spec file), while sqlite 3.7.9 (which is the latest available for Mageia1) was released only on November'1 2011.
Could it be a possibility of some regression in sqlite? Maybe it worth trying the previous version (3.7.6, if I am not mistaken)?
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: An error while making a package.

Postby MauRice » Sep 14th, '12, 06:07

Zugunder,

Maybe, your error is definitely in sqlite3: "make[1]: Leaving directory `/home/grigory/rpm/BUILD/ugene-1.11.1/src/libs_3rdparty/sqlite3'"

BTW:
I leave the requiries blank.
To test the RPM properly, you have to install the RPM on a other PC, without the build environment.
MauRice
MauRice
 
Posts: 22
Joined: Mar 25th, '11, 20:52

Re: An error while making a package.

Postby MauRice » Sep 14th, '12, 21:01

Zugunder,

On a other PC with a dual-boot Mandriva 2011 32/64 bits.
I have the same error. Version sqlite3: 3.7.13

Why ???
Why on this PC Mandriva 2011 boots normaly, and Mageia 2 I have to use the boot-options acpi=off irqpoll
MauRice
MauRice
 
Posts: 22
Joined: Mar 25th, '11, 20:52

Re: An error while making a package.

Postby zugunder » Sep 14th, '12, 22:54

MauRice,

an exclusive sqlite3 3.7.11 bug, which makes things work? :D

My guess it may a problem with packaging or package organization... For example, I used an Avast antivirus in Mandriva 2010 without any problems, but I am not able to install the same .rpm in Mageia1, though I know it installs and runs well in Mageia2.
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: An error while making a package.

Postby MauRice » Sep 15th, '12, 19:54

Zugunder,

I think you're right!
Something in Mageia 1 and Mandriva 2011 is set wrong, what?
I have on another HD with openSuSE 12.1, here also no problem to build it.
MauRice
MauRice
 
Posts: 22
Joined: Mar 25th, '11, 20:52

Re: An error while making a package (UGENE).

Postby zugunder » Sep 17th, '12, 19:50

GCC versions and settings?
zugunder
 
Posts: 388
Joined: Jun 10th, '11, 00:22

Re: An error while making a package (UGENE).

Postby doktor5000 » Sep 17th, '12, 20:36

You can't compare different distributions, surely they will differ in environment and specific settings. This does not mean the different settings are wrong, though.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 0 guests