LINUX.ORG.RU
ФорумAdmin

Мультиархитектурная сборка RPM


0

1

Доброго времени суток!

Имеется кастомизированный spec-файл от nginx для своих сборок nginx, Centos 5 2.6.18-348.12.1.el5 (x86_64), а также некий юзер, от которого собирается пакет.

Сама проблема заключается, в сборке 32-битного пакета.

Собирамемся, но при попытке установить на 32-битную систему - жалуемся на зависимости (64 битные либы):

%{__make} DESTDIR=$RPM_BUILD_ROOT install

Не собираемся (лог ниже):

%{__make} CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS=-s DESTDIR=$RPM_BUILD_ROOT install
 
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/nginx.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_log.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_palloc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_array.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_list.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_hash.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_buf.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_queue.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_output_chain.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_string.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_parse.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_inet.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_file.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_crc32.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_murmurhash.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_md5.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_rbtree.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_radix_tree.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_slab.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_times.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_shmtx.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_connection.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_cycle.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_spinlock.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_cpuinfo.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_conf_file.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_resolver.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_open_file_cache.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_crypt.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/event/ngx_event.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/event/ngx_event_timer.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/event/ngx_event_posted.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/event/ngx_event_busy_lock.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/event/ngx_event_accept.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/event/ngx_event_connect.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/event/ngx_event_pipe.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_time.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_errno.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_alloc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_files.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_socket.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_recv.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_readv_chain.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_udp_recv.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_send.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_writev_chain.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_channel.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_shmem.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_process.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_daemon.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_setaffinity.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_setproctitle.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_posix_init.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_user.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_process_cycle.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_linux_init.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/event/modules/ngx_epoll_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/os/unix/ngx_linux_sendfile_chain.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/core/ngx_regex.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_core_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_special_response.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_request.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_parse.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_header_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_write_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_copy_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_log_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_request_body.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_variables.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_script.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_upstream.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_upstream_round_robin.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_parse_time.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_static_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_index_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_chunked_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_range_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_headers_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_not_modified_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_busy_lock.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_file_cache.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_gzip_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/ngx_http_postpone_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_ssi_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_charset_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_userid_filter_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_autoindex_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_auth_basic_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_access_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_limit_conn_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_limit_req_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_geo_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_map_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_split_clients_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_referer_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_rewrite_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_proxy_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_fastcgi_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_uwsgi_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_scgi_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_memcached_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_empty_gif_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_browser_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_upstream_ip_hash_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_upstream_least_conn_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/src/http/modules/ngx_http_upstream_keepalive_module.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `objs/ngx_modules.o' is incompatible with i386:x86-64 output
objs/src/core/ngx_string.o: In function `ngx_sprintf_num':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/core/ngx_string.c:514: undefined reference to `__umoddi3'
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/core/ngx_string.c:515: undefined reference to `__udivdi3'
objs/src/core/ngx_file.o: In function `ngx_next_temp_number':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/core/ngx_file.c:232: undefined reference to `__sync_fetch_and_add_4'
objs/src/core/ngx_times.o: In function `ngx_time_sigsafe_update':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/core/ngx_times.c:193: undefined reference to `__sync_bool_compare_and_swap_4'
objs/src/core/ngx_times.o: In function `ngx_time_update':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/core/ngx_times.c:83: undefined reference to `__sync_bool_compare_and_swap_4'
objs/src/core/ngx_shmtx.o: In function `ngx_shmtx_trylock':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/core/ngx_shmtx.c:65: undefined reference to `__sync_bool_compare_and_swap_4'
objs/src/core/ngx_shmtx.o: In function `ngx_shmtx_wakeup':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/core/ngx_shmtx.c:181: undefined reference to `__sync_bool_compare_and_swap_4'
objs/src/core/ngx_shmtx.o: In function `ngx_shmtx_force_unlock':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/core/ngx_shmtx.c:154: undefined reference to `__sync_bool_compare_and_swap_4'
objs/src/core/ngx_shmtx.o:/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/core/ngx_shmtx.c:142: more undefined references to `__sync_bool_compare_and_swap_4' follow
objs/src/core/ngx_resolver.o: In function `ngx_udp_connect':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/core/ngx_resolver.c:2263: undefined reference to `__sync_fetch_and_add_4'
objs/src/event/ngx_event.o: In function `ngx_event_module_init':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/event/ngx_event.c:544: undefined reference to `__sync_bool_compare_and_swap_4'
objs/src/event/ngx_event_accept.o: In function `ngx_event_accept':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/event/ngx_event_accept.c:258: undefined reference to `__sync_fetch_and_add_4'
objs/src/event/ngx_event_connect.o: In function `ngx_event_connect_peer':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/event/ngx_event_connect.c:105: undefined reference to `__sync_fetch_and_add_4'
objs/src/http/ngx_http_write_filter_module.o: In function `ngx_http_write_filter':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/http/ngx_http_write_filter_module.c:265: undefined reference to `__divdi3'
objs/src/http/ngx_http_write_filter_module.o: In function `ngx_event_add_timer':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/event/ngx_event_timer.h:64: undefined reference to `__divdi3'
objs/src/http/ngx_http_file_cache.o: In function `ngx_http_file_cache_init':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/http/ngx_http_file_cache.c:99: undefined reference to `__divdi3'
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/http/ngx_http_file_cache.c:135: undefined reference to `__divdi3'
objs/src/http/ngx_http_file_cache.o: In function `ngx_http_file_cache_loader':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/http/ngx_http_file_cache.c:1364: undefined reference to `__sync_bool_compare_and_swap_4'
objs/src/http/ngx_http_file_cache.o: In function `ngx_http_file_cache_add_file':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/http/ngx_http_file_cache.c:1473: undefined reference to `__divdi3'
objs/src/http/ngx_http_file_cache.o: In function `ngx_http_file_cache_update':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/http/ngx_http_file_cache.c:950: undefined reference to `__divdi3'
objs/src/http/ngx_http_file_cache.o: In function `ngx_http_file_cache_open':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/http/ngx_http_file_cache.c:359: undefined reference to `__divdi3'
objs/src/http/modules/ngx_http_split_clients_module.o: In function `ngx_conf_split_clients_block':
/home/username/workspace/redhat/BUILD/nginx-1.4.2/src/http/modules/ngx_http_split_clients_module.c:192: undefined reference to `__udivdi3'
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/home/username/workspace/redhat/BUILD/nginx-1.4.2'
make: *** [install] Error 2
error: Bad exit status from /home/username/chroot/tmp/rpm-tmp.53488 (%install)

 
Доп. информация
RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables"
RPM_ARCH="i386"
Прошу натолкнуть на истинный путь, так как подобной информации не нашел по архивам рассылок, ну а опыта в сборке RPM нет;)

Ответ на: комментарий от Journalist

Как вариант — поменять в скриптах, грубо говоря, rpmbuild на mock.

dexpl ★★★★★ ()
Ответ на: комментарий от Journalist

Простите, не указал еще один ключь:

rpmbuild --target=i386 -ba «package.spec»
rpmbuild --target=x86_64 -ba «package.spec»

Journalist ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.