Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
0
answers
20
views
using ar how to I add to libfoo.a bar.o and call result libnew.a
Is there a way using ar to add to existing libfoo.a library an additional object bar.o and specify the name of the result libnew.a?
Is there a way using ar to add to existing libfoo.a library an additional object bar.o and specify the name of the result libnew.a?
foo
(1 rep)
Dec 17, 2022, 01:41 PM
1
votes
0
answers
995
views
Get around ~10GB maximum archive size
I am trying to package a Linux software into a DEB archive so it can easily be installed on Debian / Ubuntu. Unfortunately the full software is about 13 GB in size, and whenever I try to create a debian package (either with FPM or directly with dpkg-deb) I receive an error like "ar element size 1309...
I am trying to package a Linux software into a DEB archive so it can easily be installed on Debian / Ubuntu. Unfortunately the full software is about 13 GB in size, and whenever I try to create a debian package (either with FPM or directly with dpkg-deb) I receive an error like "ar element size 13099925924 is too large".
A quick Google search showed me that apparently the file size for files in a .deb archive (of which the data.tar.gz is one) is 10 digits, which would be 9999999999 bytes, or about 10 GB. Is there a way to get around this limit? Different archival formats that are still usable as a DEB archive by Debian / Ubuntu?
I found this article on lwn.net - https://lwn.net/Articles/789449/ - which describes the problem I'm having. It mentions some other, older way to create a DEB package that doesn't have this 10GB limitation, but I was unable to figure out how to use / create this, and if that format from pre-1995 is even still supported in modern Debian versions.
Or do I have to split up the contents into two DEB packages, each requiring eachother so that the user can't install just one of them?
Florian Bach
(263 rep)
Nov 1, 2020, 06:46 PM
0
votes
0
answers
777
views
/usr/bin/ar: libsql_main.a: No space left on device
I need to install libmysqlclient. Unfortunately, this package is no longer in the "main" Arch Linux repository and it has been moved to AUR, so I have to compile it myself. During compilation I get this error: /usr/bin/ar: libsql_main.a: No space left on device This message does not have to be ident...
I need to install libmysqlclient. Unfortunately, this package is no longer in the "main" Arch Linux repository and it has been moved to AUR, so I have to compile it myself. During compilation I get this error:
/usr/bin/ar: libsql_main.a: No space left on device
This message does not have to be identical to the English version. I tried to translate it as best as possible, but here's original message:
/usr/bin/ar: libsql_main.a: Brak miejsca na urządzeniu
I certainly don't lack disk space. I don't think any library weighs 50 GB? Maybe it was RAM? I have 8 GB RAM and 8 GB swap. I don't think it weighs over 16 GB... What else does linker need?
Look. Here's output of
df -h
command:
System plików rozm. użyte dost. %uż. zamont. na
dev 3,8G 0 3,8G 0% /dev
run 3,8G 1,7M 3,8G 1% /run
/dev/mapper/cryptvolgroup-root 166G 115G 43G 73% /
tmpfs 3,8G 68M 3,7G 2% /dev/shm
tmpfs 3,8G 0 3,8G 0% /sys/fs/cgroup
/dev/sda1 53G 46G 7,3G 87% /windows
tmpfs 3,8G 3,6G 165M 96% /tmp
/dev/loop0 172M 172M 0 100% /var/lib/snapd/snap/skype/123
/dev/loop1 175M 175M 0 100% /var/lib/snapd/snap/skype/118
/dev/loop2 94M 94M 0 100% /var/lib/snapd/snap/core/9066
/dev/loop3 94M 94M 0 100% /var/lib/snapd/snap/core/8935
/dev/loop4 125M 125M 0 100% /var/lib/snapd/snap/scratux/6
/dev/loop5 55M 55M 0 100% /var/lib/snapd/snap/core18/1705
/dev/loop6 161M 161M 0 100% /var/lib/snapd/snap/gnome-3-28-1804/116
/dev/loop7 63M 63M 0 100% /var/lib/snapd/snap/gtk-common-themes/1506
/dev/loop8 55M 55M 0 100% /var/lib/snapd/snap/core18/1754
/dev/loop9 428M 428M 0 100% /var/lib/anbox/rootfs
tmpfs 767M 148K 767M 1% /run/user/1000
Here's my fstab:
# Static information about the filesystems.
# See fstab(5) for details.
#
# /dev/mapper/cryptvolgroup-root
UUID= / ext4 rw,relatime 0 1
# /dev/mapper/cryptvolgroup-swap
UUID= none swap defaults 0 0
# windows
UUID= /windows/ ntfs rw,realtime 0 1
What causes this error?
yomol777
(209 rep)
May 13, 2020, 01:15 PM
-1
votes
2
answers
126
views
Any example of the difference between adding modifer "c" and "s" or not to "ar" command
Many articales provide examples of using "ar" command uses "ar rcs " without explaination of the reason. I've tried the command by myself both with and without modifier "c" and "s" and find that the output are idendical even in binary comparasion. Run "ar" without modifier "c" and "s": $ ar r out.a...
Many articales provide examples of using "ar" command uses "ar rcs " without explaination of the reason.
I've tried the command by myself both with and without modifier "c" and "s" and find that the output are idendical even in binary comparasion.
Run "ar" without modifier "c" and "s":
$ ar r out.a *.txt
ar: creating out.a
$ hexdump -C out.a
00000000 21 3c 61 72 63 68 3e 0a 61 2e 74 78 74 2f 20 20 |!.a.txt/ |
00000010 20 20 20 20 20 20 20 20 31 35 37 37 33 35 33 37 | 15773537|
00000020 35 38 20 20 31 30 30 30 20 20 31 30 30 30 20 20 |58 1000 1000 |
00000030 31 30 30 36 36 34 20 20 34 20 20 20 20 20 20 20 |100664 4 |
00000040 20 20 60 0a 61 62 63 0a 62 2e 74 78 74 2f 20 20 | `.abc.b.txt/ |
00000050 20 20 20 20 20 20 20 20 31 35 37 37 33 35 33 37 | 15773537|
00000060 35 38 20 20 31 30 30 30 20 20 31 30 30 30 20 20 |58 1000 1000 |
00000070 31 30 30 36 36 34 20 20 34 20 20 20 20 20 20 20 |100664 4 |
00000080 20 20 60 0a 64 65 66 0a | `.def.|
00000088
$ rm out.a
Run "ar" with modifier "c" and "s":
$ ar rcs out.a *.txt
$ hexdump -C out.a
00000000 21 3c 61 72 63 68 3e 0a 61 2e 74 78 74 2f 20 20 |!.a.txt/ |
00000010 20 20 20 20 20 20 20 20 31 35 37 37 33 35 33 37 | 15773537|
00000020 35 38 20 20 31 30 30 30 20 20 31 30 30 30 20 20 |58 1000 1000 |
00000030 31 30 30 36 36 34 20 20 34 20 20 20 20 20 20 20 |100664 4 |
00000040 20 20 60 0a 61 62 63 0a 62 2e 74 78 74 2f 20 20 | `.abc.b.txt/ |
00000050 20 20 20 20 20 20 20 20 31 35 37 37 33 35 33 37 | 15773537|
00000060 35 38 20 20 31 30 30 30 20 20 31 30 30 30 20 20 |58 1000 1000 |
00000070 31 30 30 36 36 34 20 20 34 20 20 20 20 20 20 20 |100664 4 |
00000080 20 20 60 0a 64 65 66 0a | `.def.|
00000088
$
So anybody can give an example to show the difference between adding and not adding the modifier?
I've read the manual page but still can't get the point.
----------
**Added 2019-12-27 02:28:45 UTC**
Thank you. Now I've understand modifier "c", but still have questions on modifier "s".
Many have mentioned "symbol", but what does it mean?
I've tried symbol link, but they are still identical:
[john@centos8-01 arTest]$ ls -l
total 8
-rw-r--r--. 1 john smith 4 Dec 27 10:18 a.txt
-rw-r--r--. 1 john smith 4 Dec 27 10:19 b.txt
lrwxrwxrwx. 1 john smith 5 Dec 27 10:19 c.txt -> a.txt
[john@centos8-01 arTest]$ ar -r out1.a *.txt
ar: creating out1.a
[john@centos8-01 arTest]$ ar -rs out2.a *.txt
ar: creating out2.a
[john@centos8-01 arTest]$ diff out1.a out2.a
[john@centos8-01 arTest]$ cat out1.a
!
a.txt/ 1577413136 1001 1001 100644 4 `
abc
b.txt/ 1577413141 1001 1001 100644 4 `
def
c.txt/ 1577413136 1001 1001 100644 4 `
abc
[john@centos8-01 arTest]$ cat out2.a
!
a.txt/ 1577413136 1001 1001 100644 4 `
abc
b.txt/ 1577413141 1001 1001 100644 4 `
def
c.txt/ 1577413136 1001 1001 100644 4 `
abc
[john@centos8-01 arTest]$
And I've tried adding symbols to my txt files:
[john@centos8-01 arTest]$ cat a.txt
abc
!@#$%^&*()_+-=~`[]\{}|;':"?,./
[john@centos8-01 arTest]$
As you can see "a.txt" had no symbols before but letters "abc" only, but now I've added all the symbols I can find on my keyboard. Now I run "ar" with and without modifier "s", but they are still identical:
[john@centos8-01 arTest]$ ls
a.txt b.txt
[john@centos8-01 arTest]$ ar r out1.a *.txt
ar: creating out1.a
[john@centos8-01 arTest]$ ar rs out2.a *.txt
ar: creating out2.a
[john@centos8-01 arTest]$ diff out1.a out2.a
And there is no "symbol table":
[john@centos8-01 arTest]$ cat out1.a
!
a.txt/ 1577413538 1001 1001 100644 37 `
abc
!@#$%^&*()_+-=~`[]\{}|;':"?,./
b.txt/ 1577413141 1001 1001 100644 4 `
def
[john@centos8-01 arTest]$ cat out2.a
!
a.txt/ 1577413538 1001 1001 100644 37 `
abc
!@#$%^&*()_+-=~`[]\{}|;':"?,./
b.txt/ 1577413141 1001 1001 100644 4 `
def
[john@centos8-01 arTest]$
Vespene Gas
(163 rep)
Dec 26, 2019, 10:05 AM
• Last activity: Dec 27, 2019, 03:37 AM
2
votes
1
answers
279
views
ar command move member (any example?)
I'm talk about the "ar" command in Linux/UNIX which is used for creating or managing archives. According to the manual, we can move members in an archive with "m" modifier. But there isn't any example. The manual page just say "If no modifiers are used with m, any members you name in the member argu...
I'm talk about the "ar" command in Linux/UNIX which is used for creating or managing archives.
According to the manual, we can move members in an archive with "m" modifier. But there isn't any example.
The manual page just say "If no modifiers are used with m, any members you name in the member arguments are moved to the end of the archive;", so I guess it should work like this (and I was successful):
$ ar -t out.a
a.txt
b.txt
c.txt
d.txt
$ ar m out.a a.txt
$ ar -t out.a
b.txt
c.txt
d.txt
a.txt
$
File "a.txt" was successfully moved to the end.
But when it comes to "you can use the a, b, or i modifiers to move them to a specified place instead", I got problem:
$ ar t out.a
a.txt
b.txt
c.txt
d.txt
$ ar ma out.a a.txt
ar: a.txt: File format not recognized
$
I thought "a" means move ahead, while "b" move backward, "i" move to index, there might be a number after the modifier. So I tried:
$ ar t out.a
a.txt
b.txt
c.txt
d.txt
$ ar ma 1 out.a a.txt
$ ar t out.a
b.txt
c.txt
d.txt
a.txt
$
"a.txt" is still moved to the end!
And when I want to move a file backward, it was still moved to then end:
$ ar t out.a
a.txt
b.txt
c.txt
d.txt
$ ar mb 1 out.a c.txt
$ ar t out.a
a.txt
b.txt
d.txt
c.txt
$
So how to use it?
Vespene Gas
(163 rep)
Dec 26, 2019, 07:56 AM
• Last activity: Dec 26, 2019, 01:06 PM
0
votes
1
answers
1936
views
Debian xarchiver "Failed to execute child process "ar" (No such file or directory)"
I have Debian 9 and Xfce. am trying to install a commercial program given as a .deb -ending file. When I double click on the file, it opens a window titled "(filename.deb) - Xarchiver 0.5.4" and on top of that a pop-up error message Can't run the archiver executable: Failed to execute child process...
I have Debian 9 and Xfce. am trying to install a commercial program given as a .deb -ending file. When I double click on the file, it opens a window titled "(filename.deb) - Xarchiver 0.5.4" and on top of that a pop-up error message
Can't run the archiver executable:
Failed to execute child process "ar" (No such file or directory)
Is
ar
a command I'm missing? I tried on a terminal sudo apt-get install ar
and the response is E: Unable to locate package ar
A similar problem seems to be in
https://unix.stackexchange.com/q/199774/344355
but their context is KDE, not Xfce.
user9393931
(103 rep)
Apr 26, 2019, 08:03 AM
• Last activity: Apr 26, 2019, 08:45 AM
2
votes
2
answers
3771
views
KDE opens .deb files with ar instead of a package manager
I just installed Debian for the first time. I use KDE. I'm trying to install Google Chrome and Steam. I download the installation package, then I double-click it. Instead of installing, both display the error > Failed to execute child process "ar" no file or directory
I just installed Debian for the first time. I use KDE. I'm trying to install Google Chrome and Steam. I download the installation package, then I double-click it. Instead of installing, both display the error
> Failed to execute child process "ar" no file or directory
Villa Caleb
(23 rep)
May 1, 2015, 02:42 AM
• Last activity: Apr 16, 2019, 03:41 PM
1
votes
0
answers
55
views
oem-bt-ar-9462-dkms error in Ubuntu
I tried install new updates and this error keeps popping up. Is there any way that i could resolve this?
I tried install new updates and this error keeps popping up. Is there any way that i could resolve this?
sanster9292
(109 rep)
Mar 25, 2015, 04:05 AM
• Last activity: Nov 25, 2018, 10:27 PM
0
votes
1
answers
3012
views
Need Intel Xeon E3-1200 drivers for Linux Mint 18
MY school got donated 35 computers that are 4 years old. Each computer has 32 bit architecture. I've taken one to use it for and AR Sandbox (project by Oliver Kreylos). For that I've installed Linux Mint Version 18.3 "SYLVIA" with MATE desktop for 32 bit architecture. Then I have installed all softw...
MY school got donated 35 computers that are 4 years old. Each computer has 32 bit architecture. I've taken one to use it for and AR Sandbox (project by Oliver Kreylos). For that I've installed Linux Mint Version 18.3 "SYLVIA" with MATE desktop for 32 bit architecture. Then I have installed all software needed by the AR Sandbox, since now referred to as SARndbox. Then I got to the last step of this installation process , the
./bin/CalibrateProjector -s 1024 768
step.
When I run that I get this error:
~/src/SARndbox-2.4 $ ./bin/CalibrateProjector -s 1024 768
CalibrateProjector: Capturing 120 background frames...Vrui: Caught exception GLExtensionManager: Extension GL_EXT_gpu_shader4 not supported by local OpenGL while initializing rendering windows
done
which means I don't have drivers compatible with openGL which are necessary to run this program. I've installed the SARndbox in three different computers and this is the first time I got this error.
When I run lspci | grep VGA
, I get 00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
.
Then glxinfo | grep Vendor
gives me `server glx vendor string: SGI
client,
glx vendor string: Mesa Project, and
SGI
OpenGL vendor string: Intel Open Source Technology Center` which means I don't have the necessary drivers installed. I have started using Linux three months ago and I still don't know how exactly drivers work in Linux, I have read that normally Linux comes with all the necessary drivers out of the box but sometimes there are proprietary drivers which need to be installed from their site. And I have already searched for quite a while but I didn't find the drivers for Linux.
Could anyone tell me where to find them? I think I could install them by myself but if you will, could you explain me how to install them too?
Thank you in advance.
Dem Rottensoul
(3 rep)
Jun 26, 2018, 11:09 AM
• Last activity: Jun 26, 2018, 11:30 AM
4
votes
1
answers
1470
views
GCC not runnable on FreeBSD
I'm trying to run GCC on FreeBSD and I get this error: % gcc ar: unrecognized option `--plugin' usage: ar -d [-Tjsvz] archive file ... ar -m [-Tjsvz] archive file ... ar -m [-Tabijsvz] position archive file ... ar -p [-Tv] archive [file ...] ar -q [-TcDjsvz] archive file ... ar -r [-TcDjsuvz] archiv...
I'm trying to run GCC on FreeBSD and I get this error:
% gcc
ar: unrecognized option `--plugin'
usage: ar -d [-Tjsvz] archive file ...
ar -m [-Tjsvz] archive file ...
ar -m [-Tabijsvz] position archive file ...
ar -p [-Tv] archive [file ...]
ar -q [-TcDjsvz] archive file ...
ar -r [-TcDjsuvz] archive file ...
ar -r [-TabcDijsuvz] position archive file ...
ar -s [-jz] archive
ar -t [-Tv] archive [file ...]
ar -x [-CTouv] archive [file ...]
ar -V
I have installed the following version of GCC using the binary pkg:
% pkg info gcc
gcc-4.7.3_1
Name : gcc
Version : 4.7.3_1
Installed on : Wed Jun 25 15:22:58 CEST 2014
Origin : lang/gcc
Architecture : freebsd:10:x86:64
Prefix : /usr/local
Categories : lang java
Licenses : GPLv3RLE and GPLv3
Maintainer : gerald@FreeBSD.org
WWW : http://gcc.gnu.org/
Comment : GNU Compiler Collection 4.7
Options :
BOOTSTRAP : off
JAVA : on
I have installed the port version as well with the same results.
What can possibly be wrong?
ase
(203 rep)
Jun 27, 2014, 10:46 AM
• Last activity: Dec 14, 2016, 08:39 AM
3
votes
4
answers
2063
views
How it is possible that dpkg isn't neccesary for installing deb packages?
The information below seems misleading. I am confused with the example they give that if you lose dpkg (the program that lets you handle .deb files) you can use the other commands ar, tar, and gzip commands to download the .deb file for dpkg itself? If this is true, what is so special about dpkg tha...
The information below seems misleading. I am confused with the example they give that if you lose dpkg (the program that lets you handle .deb files) you can use the other commands ar, tar, and gzip commands to download the .deb file for dpkg itself?
If this is true, what is so special about dpkg that is not available with the other commands?
> As a Debian system administrator, you will routinely handle .deb
> packages, since they contain consistent functional units
> (applications, documentation, etc.), whose installation and
> maintenance they facilitate. It is therefore a good idea to know what
> they are and how to use them. This chapter describes the structure and
> contents of “binary” and “source” packages. The former are .deb files,
> directly usable by dpkg, while the latter contain the source code, as
> well as instructions for building binary packages.
>
>
> From: http://debian-handbook.info/browse/wheezy/packaging-system.html
>
> 5.1. Structure of a Binary Package The Debian package format is designed so that its content may be extracted on any Unix system that
> has the classic commands ar, tar, and gzip (sometimes xz or bzip2).
> This seemingly trivial property is important for portability and
> disaster recovery. Imagine, for example, that you mistakenly deleted
> the dpkg program, and that you could thus no longer install Debian
> packages. dpkg being a Debian package itself, it would seem your
> system would be done for... **Fortunately, you know the format of a
> package and can therefore download the .deb file of the dpkg package**
> and install it manually (see the “TOOLS” sidebar). If by some
> misfortune one or more of the programs ar, tar or gzip/xz/bzip2 have
> disappeared, you will only need to copy the missing program from
> another system (since each of these operates in a completely
> autonomous manner, without dependencies, a simple copy will suffice).
BluePython
(149 rep)
Jul 24, 2014, 08:31 PM
• Last activity: Jun 15, 2016, 02:52 PM
0
votes
0
answers
215
views
Weird G++/AR Compilation issue
I'm working a patch-set to compile `dpkg` and APT onto Cygwin. I've almost got everything working, but I'm encountering some weird behavior with `ar`/`g++` that I can't explain. APT's stock Makefile uses some fancy wrapping around a pretty standard `.cc` → `.o` → `.a` flow for support libraries...
I'm working a patch-set to compile
dpkg
and APT onto Cygwin. I've almost got everything working, but I'm encountering some weird behavior with ar
/g++
that I can't explain.
APT's stock Makefile uses some fancy wrapping around a pretty standard
.cc
→ .o
→ .a
flow for support libraries, which are then linked in with the main code. It works great under Linux. Under Cygwin, however, the linker stage, using slightly different commands, fails in a way that I don't understand.
Why is it that
g++ -g -O2 \ -L../build/bin \ -o ../build/bin/apt \ ../build/obj/cmdline/apt.o \ ../build/obj/apt-pkg/*.o \ ← (This is different.) -lapt-private -lbz2 -liconv -lintl -llzma -lzworks on my system, but
ar rcs ../build/bin/libapt-pkg.a ../build/obj/apt-pkg/*.o ← (This is different.) g++ -g -O2 \ -L../build/bin \ -o ../build/bin/apt \ ../build/obj/cmdline/apt.o \ -lapt-pkg \ ← (This is different.) -lapt-private -lbz2 -liconv -lintl -llzma -lzdoesn't? When I run the second one,
libapt-pkg.a
builds OK, but the g++
step produces errors of the form:
$ g++ -g -O2 -L../build/bin -o ../build/bin/apt ../build/obj/cmdline/apt.o -lapt-pkg -lapt-private -lbz2 -liconv -lintl -llzma -lz 2>&1 | head
../build/bin/libapt-private.a(private-upgrade.o): In function `CacheFile':
./apt/apt-private/../build/include/apt-private/private-cachefile.h:47: undefined reference to `pkgCacheFile::pkgCacheFile()'
./apt/apt-private/../build/include/apt-private/private-cachefile.h:47:(.text+0x1e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `pkgCacheFile::pkgCacheFile()'
Shouldn't the two command sequences shown above be functionally equivalent? What's the difference?
Nicholas Clark
(332 rep)
Aug 3, 2015, 07:27 AM
• Last activity: Aug 3, 2015, 09:55 PM
3
votes
1
answers
6774
views
Deleting a file object from a library
I've created a library with 3 file objects using: ar rv arhiva.a file.o file2.o file3.o Why I can't delete a file object from it? I've used ar xv arhiva.a file.o ![enter image description here][1] [1]: https://i.sstatic.net/chFop.png
I've created a library with 3 file objects using:
ar rv arhiva.a file.o file2.o file3.o
Why I can't delete a file object from it? I've used
ar xv arhiva.a file.o

Shury
(133 rep)
Jan 27, 2015, 03:42 PM
• Last activity: May 11, 2015, 06:46 AM
4
votes
1
answers
2050
views
Why doesn't 'ar' work like the manpage says?
I'm trying to use 'ar' included in Debian Wheezy armel version of binutils and it doesn't seem to operate like on other systems I've encountered. Some sample output from the command-line: $ ar Usage: ar [options] archive Generate an index to speed access to archives The options are: @ Read options f...
I'm trying to use 'ar' included in Debian Wheezy armel version of binutils and it doesn't seem to operate like on other systems I've encountered.
Some sample output from the command-line:
$ ar
Usage: ar [options] archive
Generate an index to speed access to archives
The options are:
@ Read options from
--plugin Load the specified plugin
-t Update the archive's symbol map timestamp
-h --help Print this help message
-v --version Print version information
ar: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
$ ar -crs something.a file1.o file2.o
ar: invalid option -- 'c'
ar: invalid option -- 'r'
ar: invalid option -- 's'
What am I missing here? Why do I always get the invalid option message?
cachance7
(173 rep)
May 16, 2014, 05:32 PM
• Last activity: May 10, 2015, 07:47 AM
Showing page 1 of 14 total questions