Źródła budują się na 32bit na 100% (zob. m.in.: https://archlinux32.org/packages/?q=imagescan (https://archlinux32.org/packages/?q=imagescan)). Zatem to co Paweł podesłał to już 90% roboty. Reszta to już kompilacja. Masz np. tu: . Ogólnie winno to się sprowadzić do:
(http://blog.onedollardata.com/how-to-install-src-rpm-packages-in-opensuse/[/url)mkdir imagescan
cd imagescan
wget http://support.epson.net/linux/src/scanner/imagescanv3/opensuse/imagescan-3.62.0-1epson4opensuse15.1.src.rpm
rpmbuild --rebuild imagescan-3.62.0-1epson4opensuse15.1.src.rpm
Potem już instalacja zypperem i... modlenie się w wyznaniu rpmowym, by paczka, która jest źródłami teoretycznie dla Leap 15.1 poprawnie się zbudowała i działała w Tumbleweed.
Jeśli to się nie powiedzie (wątpię), to są jeszcze "ogólne" źródła (http://support.epson.net/linux/src/scanner/imagescanv3/common/imagescan_3.62.0.orig.tar.gz) ale kompilacja nie będzie już tak miła i prosta.
Oświecę Cie, przyjacielu - nie jestem aż tak ciemny,poczytałem masę anglojęzycznych tutoriali i wszędzie kazali z root,więc zrobiłem to z konta root. I to, co dałem w poprzednim wpisie,to wynik tego polecenia wykonany z konta root.
Wpisałem też w google to, co wypluł mi terminal i tu z pomocą mi przyszła pewna rosyjskojęzyczna strona (https://russianpenguin.ru/2018/05/19/fedora-%D1%81%D0%B1%D0%BE%D1%80%D0%BA%D0%B0-%D0%BF%D0%B0%D0%BA%D0%B5%D1%82%D0%BE%D0%B2-%D0%B8%D0%B7-src-rpm/)
I zgodnie z zawartymi tam sugestiami zrobiłem
najpierw to
rpmbuild --rebuild --define "uversion 3.59.2" imagescan-3.59.2-1epson4opensuse15.0.src.rpm
Installing imagescan-3.59.2-1epson4opensuse15.0.src.rpm
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
error: Bad source: /usr/src/packages/SOURCES/utsushi-3.59.2.tar.gz: No such file or directory
Jak widać kierowałem się numeracją pakietu,co okazało się nie do końca słuszne i zaliczyłem zonk,więc spróbowałem tego:
localhost:/usr/src/packages/SOURCES # ls
gdk-pixbuf-format.patch imagescan.desktop
gtkmm-2.20-compat.patch rebranding.patch
imagescan.conf utsushi-0.59.2.tar.gz
i następnie to:
# rpmbuild --rebuild --define "uversion 0.59.2" imagescan-3.59.2-1epson4opensuse15.0.src.rpm
Installing imagescan-3.59.2-1epson4opensuse15.0.src.rpm
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
error: Failed build dependencies:
GraphicsMagick is needed by imagescan-3.59.2-1.i586
boost-devel is needed by imagescan-3.59.2-1.i586
gtkmm24-devel is needed by imagescan-3.59.2-1.i586
libGraphicsMagick++-devel is needed by imagescan-3.59.2-1.i586
libjpeg-devel is needed by imagescan-3.59.2-1.i586
libtiff-devel is needed by imagescan-3.59.2-1.i586
libudev-devel is needed by imagescan-3.59.2-1.i586
libusb-1_0-devel is needed by imagescan-3.59.2-1.i586
sane-backends-devel is needed by imagescan-3.59.2-1.i586
Zainstalowałem zypperem brakujące pakiety i wypluło to:
# rpmbuild --rebuild --define "uversion 0.59.2" imagescan-3.59.2-1epson4opensuse15.0.src.rpm
Installing imagescan-3.59.2-1epson4opensuse15.0.src.rpm
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
warning: user build does not exist - using root
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.kjLGqO
+ umask 022
+ cd /usr/src/packages/BUILD
+ cd /usr/src/packages/BUILD
+ rm -rf utsushi-0.59.2
+ /usr/bin/gzip -dc /usr/src/packages/SOURCES/utsushi-0.59.2.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd utsushi-0.59.2
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch #0 (rebranding.patch):'
Patch #0 (rebranding.patch):
+ /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0
patching file README
patching file gtkmm/about.xml.in
patching file lib/monitor.cpp
patching file lib/run-time.cpp
+ sed -i 's/^utsushi-0\.\([^ \t]*\) /imagescan-3.\1/' NEWS
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.SOTk9P
+ umask 022
+ cd /usr/src/packages/BUILD
+ /usr/bin/rm -rf /usr/src/packages/BUILDROOT/imagescan-3.59.2-1.i386
++ dirname /usr/src/packages/BUILDROOT/imagescan-3.59.2-1.i386
+ /usr/bin/mkdir -p /usr/src/packages/BUILDROOT
+ /usr/bin/mkdir /usr/src/packages/BUILDROOT/imagescan-3.59.2-1.i386
+ cd utsushi-0.59.2
+ CFLAGS='-O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables '
+ export FFLAGS
+ FCFLAGS='-O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables '
+ export FCFLAGS
+ LDFLAGS=
+ export LDFLAGS
+ ./configure --host=i586-suse-linux-gnu --build=i586-suse-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --with-jpeg --with-tiff --with-gtkmm --with-sane --with-magick --with-magick-pp --disable-static
configure: loading site script /usr/share/site/i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for i586-suse-linux-gnu-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for gcc option to support OpenMP... -fopenmp
checking for i586-suse-linux-gnu-g++... no
checking for i586-suse-linux-gnu-c++... no
checking for i586-suse-linux-gnu-gpp... no
checking for i586-suse-linux-gnu-aCC... no
checking for i586-suse-linux-gnu-CC... no
checking for i586-suse-linux-gnu-cxx... no
checking for i586-suse-linux-gnu-cc++... no
checking for i586-suse-linux-gnu-cl.exe... no
checking for i586-suse-linux-gnu-FCC... no
checking for i586-suse-linux-gnu-KCC... no
checking for i586-suse-linux-gnu-RCC... no
checking for i586-suse-linux-gnu-xlC_r... no
checking for i586-suse-linux-gnu-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking standard compliance level of g++... 201402L
checking for i586-suse-linux-gnu-ar... no
checking for i586-suse-linux-gnu-lib... no
checking for i586-suse-linux-gnu-link... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking for i586-suse-linux-gnu-pkg-config... /usr/bin/i586-suse-linux-gnu-pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking build system type... i586-suse-linux-gnu
checking host system type... i586-suse-linux-gnu
checking for ld used by gcc... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i586-suse-linux-gnu file names to i586-suse-linux-gnu format... func_convert_file_noop
checking how to convert i586-suse-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/i586-suse-linux/bin/ld option to reload object files... -r
checking for i586-suse-linux-gnu-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for i586-suse-linux-gnu-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for i586-suse-linux-gnu-ar... ar
checking for archiver @FILE support... @
checking for i586-suse-linux-gnu-strip... no
checking for strip... strip
checking for i586-suse-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for i586-suse-linux-gnu-mt... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/i586-suse-linux/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/i586-suse-linux/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/i586-suse-linux/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking which extension is used for runtime loadable modules... .so
checking which variable specifies run-time module search path... LD_LIBRARY_PATH
checking for the default library search path... /lib /usr/lib /usr/local/lib /usr/lib/graphviz /usr/lib/graphviz/sharp /usr/lib/graphviz/java /usr/lib/graphviz/perl /usr/lib/graphviz/php /usr/lib/graphviz/ocaml /usr/lib/graphviz/python /usr/lib/graphviz/lua /usr/lib/graphviz/tcl /usr/lib/graphviz/guile /usr/lib/graphviz/ruby /usr/lib/kid3
checking for library containing dlopen... -ldl
checking for dlerror... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dld_link in -ldld... no
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... yes
checking for argz.h... yes
checking for error_t... yes
checking for argz_add... yes
checking for argz_append... yes
checking for argz_count... yes
checking for argz_create_sep... yes
checking for argz_insert... yes
checking for argz_next... yes
checking for argz_stringify... yes
checking if argz actually works... yes
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for ltdl.h... yes
checking whether lt_dlinterface_register is declared... yes
checking for lt_dladvise_preload in -lltdl... yes
checking where to find libltdl headers...
checking where to find libltdl library... -lltdl
checking for unistd.h... (cached) yes
checking for dl.h... no
checking for sys/dl.h... no
checking for dld.h... no
checking for mach-o/dyld.h... no
checking for dirent.h... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
checking for strlcat... no
checking for strlcpy... no
checking for boostlib >= 1.49.0... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... no
checking for exit in -lboost_system... (cached) no
configure: error: Could not link against boost_system !
error: Bad exit status from /var/tmp/rpm-tmp.SOTk9P (%build)
RPM build errors:
user build does not exist - using root
user build does not exist - using root
user build does not exist - using root
user build does not exist - using root
user build does not exist - using root
user build does not exist - using root
user build does not exist - using root
Bad exit status from /var/tmp/rpm-tmp.SOTk9P (%build)
Postanowiłem zatem wykonać zadanie na raty.
Wszedłem do katralogu
localhost:/usr/src/packages/BUILD/utsushi-0.59.2
i wykonałem
Na koińcu wypluło mi to:
checking for exit in -lboost_system... no
checking for exit in -lboost_system... (cached) no
configure: error: Could not link against boost_system !
No więc doinstalowałem yastem2 brakujące pakiety związane z lboost
ipuściłem configure jeszcze raz.
Przeszło pomyślnie.
To tradycyjnie zapodałem
i make wypluło 2 błędy
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:64: error: 'GTypeDebugFlags' is deprecated [-Werror=deprecated-declarations]
236 | void gtk_type_init (GTypeDebugFlags debug_flags);
| ^
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
from /usr/include/gtk-2.0/gdk/gdk.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from /usr/include/gtkmm-2.4/gtkmm/box.h:44,
from /usr/include/gtkmm-2.4/gtkmm/dialog.h:31,
from action-dialog.hpp:27,
from action-dialog.cpp:25:
/usr/include/glib-2.0/gobject/gtype.h:685:3: note: declared here
685 | } GTypeDebugFlags GLIB_DEPRECATED_TYPE_IN_2_36;
| ^~~~~~~~~~~~~~~
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:126,
from /usr/include/gtkmm-2.4/gtkmm/box.h:44,
from /usr/include/gtkmm-2.4/gtkmm/dialog.h:31,
from action-dialog.hpp:27,
from action-dialog.cpp:25:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:12: error: 'GTimeVal' is deprecated: Use 'GDateTime' instead [-Werror=deprecated-declarations]
73 | GTimeVal last_popdown;
| ^~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from /usr/include/glibmm-2.4/glibmm/unicode.h:23,
from /usr/include/glibmm-2.4/glibmm/ustring.h:21,
from /usr/include/gtkmm-2.4/gtkmm/dialog.h:7,
from action-dialog.hpp:27,
from action-dialog.cpp:25:
/usr/include/glib-2.0/glib/gtypes.h:549:26: note: declared here
549 | typedef struct _GTimeVal GTimeVal GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime);
| ^~~~~~~~
In file included from /usr/include/gtkmm-2.4/gtkmm/image.h:33,
from action-dialog.cpp:35:
/usr/include/gdkmm-2.4/gdkmm/pixbufanimation.h:124:72: error: 'GTimeVal' is deprecated: Use 'GDateTime' instead [-Werror=deprecated-declarations]
124 | Glib::RefPtr<PixbufAnimationIter> get_iter(const GTimeVal* start_time);
| ^
In file included from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from /usr/include/glibmm-2.4/glibmm/unicode.h:23,
from /usr/include/glibmm-2.4/glibmm/ustring.h:21,
from /usr/include/gtkmm-2.4/gtkmm/dialog.h:7,
from action-dialog.hpp:27,
from action-dialog.cpp:25:
/usr/include/glib-2.0/glib/gtypes.h:549:26: note: declared here
549 | typedef struct _GTimeVal GTimeVal GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime);
| ^~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:568: action-dialog.lo] Błąd 1
make[2]: Opuszczenie katalogu '/usr/src/packages/BUILD/utsushi-0.59.2/gtkmm'
make[1]: *** [Makefile:604: all-recursive] Błąd 1
make[1]: Opuszczenie katalogu '/usr/src/packages/BUILD/utsushi-0.59.2'
make: *** [Makefile:511: all] Błąd 2
Pytanie co teraz robić?
Mogę jedynie tyle podpowiedzieć, że w przypadku Archa stosowny plik, który powoduje kompilację, zawiera:
cd utsushi-$_utsushiver
sed -e 's|-Werror||g' -i configure.ac
Linijka druga powoduje, usunięcie flagi "-Werror", co umożliwia kompilację. Jak to zrobić w przypadku rpm dla OpenSUSE - nie wiem, bo po prostu nie mam.
Robert
pojęcia nie mam,kiego grzyba szuka mi w systemie jakiegos uzyszkodnika o nazwie build.
A zwykłego rpm-u,jak nie było, tak nie ma.
Pliki wewnątrz pakietu źródłowego były utworzone z konta o nazwie build. Program rpmbuild ostrzega, że w obecnym systemie takiego użytkownika nie ma. Nie budujemy na koncie root.
Pewnie coś pominę, ale nie wnikam w całą politykę SUSE, itd. Minimalnie do budowania pakietów instalujemy:
zypper in rpm-build rpmdevtools
Tworzymy drzewo katalogów:
Rozpakowujemy "instalujemy" pakiet źródłowy:
rpm -ivh /ścieżka/do/pakietu/nazwa.src.rpm
Budujemy pakiet (po przejściu do katalogu ~/rpmbuild/SPECS):
rpmbuild -ba --define "uversion 0.62.0" imagescan.spec
pavbaranov
Jak to jak? Tak samo - łopatą, ogniem i sedem :D
Dodać na końcu sekcji %prep:
%__sed -e 's|-Werror||g' -i %{_builddir}/%{upstream}-%{uversion}/configure.ac
Na początku sekcji %build - przed %configure dodać:
W sekcji %files w tym miejscu dodać %ghost:
%if "true" == "%{have_sane_dll_d}"
%ghost %{_sysconfdir}/sane.d/dll.d/%{name}
%endif
Zależność budowania jest zbyt ogólnie podana - trzeba kopać i zainstalować takie:
[root@suse ~]# rpm -qa \*boost*-devel --queryformat '%{name}\n'
libboost_headers-devel
libboost_chrono1_71_0-devel
libboost_thread-devel
libboost_headers1_71_0-devel
libboost_test1_71_0-devel
libboost_date_time1_71_0-devel
libboost_iostreams1_71_0-devel
libboost_program_options-devel
libboost_filesystem1_71_0-devel
libboost_test-devel
libboost_thread1_71_0-devel
libboost_system1_71_0-devel
boost-devel
libboost_program_options1_71_0-devel
Sprawdzone na OpenSUSE Tumbleweed 64bit przy użyciu najnowszej wersji pakietu, który podał Paweł Kraszewski:
http://support.epson.net/linux/src/scanner/imagescanv3/opensuse/imagescan-3.62.0-1epson4opensuse15.1.src.rpm .