Package Details: brscan2 0.2.5_1-1

Git Clone URL: https://aur.archlinux.org/brscan2.git (read-only)
Package Base: brscan2
Description: SANE driver from Brother for brscan2 models
Upstream URL: http://support.brother.com
Licenses: GPL, custom:brother
Submitter: leidola
Maintainer: pmattern
Last Packager: pmattern
Votes: 40
Popularity: 0.050662
First Submitted: 2008-08-15 02:08
Last Updated: 2015-08-04 22:29

Latest Comments

AJSlye commented on 2015-02-26 04:29

I solved my issue by using the brscan2-network AUR package instead:
https://aur.archlinux.org/packages/brscan2-network/

AJSlye commented on 2015-02-26 04:28

I solved my issue by using the brscan2-network AUR package:
https://aur.archlinux.org/packages/brscan2-network/

AJSlye commented on 2015-02-25 22:25

This seems to be still broken, here is what I'm getting:
# scanimage -L
bugchk_free(ptr=(nil))@brother_modelinf.c(482)
Aborted (core dumped)

But It works as root:
# scanimage -L
bugchk_free(ptr=(nil))@brother_modelinf.c(482)

What Am I doing Wrong?

AJSlye commented on 2015-02-25 22:24

This is still broken here is what I'm getting:
# scanimage -L
bugchk_free(ptr=(nil))@brother_modelinf.c(482)
Aborted (core dumped)

But It works as root:
# scanimage -L
bugchk_free(ptr=(nil))@brother_modelinf.c(482)

What Am I doing Wrong?

AJSlye commented on 2015-02-25 21:44

This is still broken here is what I'm getting:
# scanimage -L
bugchk_free(ptr=(nil))@brother_modelinf.c(482)
Aborted (core dumped)

crs commented on 2015-01-11 06:11

/usr/local/Brother is referenced in libsane-brother2.so.1.0.7

the PKGBUILD tries to relocate the files in the RPM package from /usr/local/Brother to /usr/share/brother, but does an incomplete job.
This seems contrary to KISS, and the renaming of lib64 to lib seemed
inelegant too, so I found a way to do that while extracting from the RPM:

if [ "$CARCH" == "i686" ]; then
source="http://www.brother.com/pub/bsc/linux/dlf/$pkgname-$pkgver-$pkgrel.i386.rpm"
md5sums='944432983dcb918704862147b2a27977'
else
source="http://www.brother.com/pub/bsc/linux/dlf/$pkgname-$pkgver-$pkgrel.x86_64.rpm"
md5sums='88ab217b814ba87ac855b21dc037e0ac'
fi
rpm=`basename ${source[0]}`
noextract=($rpm) # we'll extract manually in prepare()

source+=('scanner-license.txt')
md5sums+=('SKIP')

prepare() {
# change "lib64" to "lib" in paths and symlinks
rpm2cpio $rpm | bsdtar -xpf - -s @/lib64/@/lib/@
}

package() {
cp -pR "$srcdir/usr" "$pkgdir"
install -m 644 -D scanner-license.txt \
"${pkgdir}/usr/share/licenses/${pkgname}/scanner-license.txt"
}


And finally, a suggestion for updating /etc/sane.d/dll.conf from brscan2.install:

post_install() {
echo 'brother2 #brscan2#' >> /etc/sane.d/dll.conf
}

post_remove() {
sed -i '/#brscan2#/d' /etc/sane.d/dll.conf
}

ams1 commented on 2014-12-04 17:05

I added that info to the wiki page for dcp150c.

robtaylor commented on 2014-09-17 20:15

I can confirm that to stop the crash on x86_64 you need
sudo ln -s /usr/share/brother/sane/ /usr/local/Brother/sane

However I can see no reason that it's trying to open /usr/local/Brother/sane/Brsane2.ini. strace confirms that it is, but I can find no occurance of /usr/local in any of the installed files!

May break out a debug build of glibc and see if I can figure what's going on...

Evilandi666 commented on 2014-07-29 11:57

I try to fix those bugs on x86_64

Anonymous comment on 2014-07-23 12:33

As the problem only seems to occur on 64-bit and I cannot test this myself, I will disown the package so that someone else can pick this up.

Anonymous comment on 2014-07-23 12:26

@pavbaranov: thx, great tip! as this PKGBUILD didnt work on x86_64 (only i686)

used this PKGBUILD according to the wiki:
pkgname=brscan2
pkgver=0.2.5
pkgrel=1
pkgdesc="SANE drivers from Brother for model-2 scanners"
arch=('i686' 'x86_64')
url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
license=('custom')
depends=('libusb-compat')
makedepends=('rpmextract')
source=("http://download.brother.com/welcome/dlf006639/brscan2-0.2.5-1.i386.rpm"
"http://download.brother.com/welcome/dlf006640/brscan2-0.2.5-1.x86_64.rpm"
'LICENSE')

sha256sums=('f9c12f8467288c48cd00b532b2c64f53764a001f4b193f1c5f1ac746a1bd7c9c'
'ab02c4e2292e9847a0338a225973735ccaec49c3d443f584004c8f91f5d6a8c9'
'52d228e8cf2f8b0b25d7c86f8ecb2151bbd7cbe6ec322c26471ae6d7276ecc99')

noextract=('brscan2-0.2.5-1.i386.rpm'
'brscan2-0.2.5-1.x86_64.rpm')

build() {
cd "${srcdir}"
if [[ $CARCH = "i686" ]]; then
echo "using: brscan2-0.2.5-1.i386.rpm"
rpmextract.sh brscan2-0.2.5-1.i386.rpm

else
echo "using: brscan2-0.2.5-1.x86_64.rpm"
rpmextract.sh brscan2-0.2.5-1.x86_64.rpm

fi

}
package() {
mv -v "${srcdir}/usr" "${pkgdir}/"

# install LICENSE
install -Dm0644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

lsandig commented on 2014-07-13 13:56

@libernux

Tested it, still won't work without a link from /usr/local/Brother to /usr/share/brother

Anonymous comment on 2014-07-10 21:54

I've looked into this and I found a reference to '/usr/local' in one of the shared-libraries.
The reference to '/usr/local' is now replaced by '/usr/share'.
I hope this fixes all problems.
Can someone please test this on 64-bit Arch.

Anonymous comment on 2014-07-10 12:48

are you on 64-bit?

RoBug commented on 2014-07-09 20:33

@libernux

on a fresh arch install i created symlinks as suggested by pavbarnov and lsandig.
and just to be on the safe side i created this one:
ln -s /usr/share/brother/sane/ /usr/local/brother/sane
(note the lowercase b in "brother") and it works great with no leftover files from previous install and it refused to work before i did this

RoBug commented on 2014-07-09 20:33

@libernux

on a fresh arch install i created symlinks as suggested by pavbarnov and lsandig.
and just to be on the safe side i created this one:
ln -s /usr/share/brother/sane/ /usr/local/brother/sane
(note the lowercase b in "brother") and it works great with no leftover files from previous install

Anonymous comment on 2014-07-05 10:19

The latest package does not install anything in /usr/local.
So if your solution works then there are still files from a previous install left on your system.

lsandig commented on 2014-07-05 09:43

Still had the same error as pavbarnov:

bugchk_free(ptr=(nil))@brother_modelinf.c(482)
Aborted (core dumped)

Adding the link
$ sudo ln -s /usr/share/brother/sane/ /usr/local/Brother/sane
to match the folder layout from brother's rpm fixed it for me.

Anonymous comment on 2014-05-16 13:50

Updated PGKBUILD.
Now installs in /usr/share/brother instead of /usr/local/Brother.
@pavbaranov: if your scanner is not working check that /usr/lib64 is a link to /usr/lib!!

pavbaranov commented on 2014-05-16 11:43

After some changes in Arch it's very probably, that your brscan2 scanner will not work anymore. The solution is very simple. You should do this:
# ln -s /usr/lib/sane/libsane-brother2.so /usr/local/lib/sane/
# ln -s /usr/lib/sane/libsane-brother2.so.1 /usr/local/lib/sane/
# ln -s /usr/lib/sane/libsane-brother2.so.1.0.7 /usr/local/lib/sane/

Anonymous comment on 2014-03-26 19:33

Reverted back to old install location to fix scanner-problem.
Thanks pavbaranov for pointing this out to me!

So there is no need to follow pavbaranov's previous post.

Anonymous comment on 2014-03-26 18:55

Reverted back to old install location to fix scanner-problem.
Thanks pavbaranov for pointing this out to me!

pavbaranov commented on 2014-03-26 13:56

If somebody has this same problem with brscan2 as I (64bit system!), then:
1. Remove brscan2
2. Install driver according to this: https://wiki.archlinux.org/index.php/Brother_MFC-420CN#Scanner
It works.

pavbaranov commented on 2014-03-25 20:14

Scanner works fine. The problem is, that location of /usr/share/brother/sane/ is wrong. DCP-115C works perfectly with original location in /usr/local/Brother/sane

Anonymous comment on 2014-03-25 18:38

@pavbaranov

That looks okay to me.
For me the package works for a brother MFC210-scanner on arch32.
I'm not in any printer- or scanner-group.
The only group i'm in is the wheel-group (for sudo access).
I'm out of ideas at this moment

pavbaranov commented on 2014-03-25 17:40

ldd /usr/lib/sane/libsane-brother2.so.1.0.7
linux-vdso.so.1 (0x00007fff71c00000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f6fb49e8000)
libnsl.so.1 => /usr/lib/libnsl.so.1 (0x00007f6fb47d0000)
libusb-0.1.so.4 => /usr/lib/libusb-0.1.so.4 (0x00007f6fb45c8000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f6fb42c0000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f6fb40b8000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f6fb3d10000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f6fb4d60000)
libusb-1.0.so.0 => /usr/lib/libusb-1.0.so.0 (0x00007f6fb3af8000)
libudev.so.1 => /usr/lib/libudev.so.1 (0x00007f6fb3ae8000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007f6fb38e0000)

Anonymous comment on 2014-03-25 15:30

@pavbaranov

What is the output of: ldd /usr/lib/sane/libsane-brother2.so.1.0.7

Anonymous comment on 2014-03-25 15:29

@https://aur.archlinux.org/account/pavbaranov

What is the output of: ldd /usr/lib/sane/libsane-brother2.so.1.0.7

pavbaranov commented on 2014-03-25 14:39

@ libernux
Yes, it's the same error:
SANE_DEBUG_DLL=3 scanimage -L
[sanei_debug] Setting debug level of dll to 3.
[dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.25git
[dll] sane_init/read_dlld: using config directory `/etc/sane.d/dll.d'
<CUT; in those lines, sane is adding backends for different scanners I'm not using it>
[dll] add_backend: adding backend `brother2'
[dll] add_backend: adding backend `brother2'
[dll] add_backend: `brother2' is already there
[dll] sane_get_devices
[dll] load: searching backend `brother2' in `/usr/lib/sane'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-brother2.so.1'
[dll] init: initializing backend `brother2'
bugchk_free(ptr=(nil))@brother_modelinf.c(482)
Aborted (core dumped)

It's very stange, that:
I've just installed vuescan and it scan everything perfectly. Maybe it's not problem with brscan2 but with sane (and sane-git, too - I've just checked it).

Anonymous comment on 2014-03-25 14:30

Fixed location in .install file

@pavbaranov:

Do you see any errors if you run:

SANE_DEBUG_DLL=3 scanimage -L

pavbaranov commented on 2014-03-25 13:01

I've just installed this on my 64bit Arch (two computers one is on stable and one is on testing, first with KDE and second with MATE).
Command:
scanimage -L
ends with this error:
bugchk_free(ptr=(nil))@brother_modelinf.c(482)
Aborted (core dumped)

I have had my DCP-115C for years and it's working perfectly since early autumn last year (2013) (with the old install script).

BTW: There is an error in brsan2.install because setupSaneScan2, after last changes, is in different locations.

Anonymous comment on 2014-03-15 21:31

Now installs in /usr/share/brother instead of /usr/local/Brother

Anonymous comment on 2014-03-15 00:01

Improved PKGBUILD

Anonymous comment on 2014-03-09 13:56

Added license-file

Anonymous comment on 2014-03-05 23:59

Added dependency to libusb-compat.
Otherwise no scanner will be detected.

Anonymous comment on 2014-03-05 23:57

Added dependency to libusb-compat.
This is necessary to detect the correct scanner.
Otherwise no scanner will be detected.

Anonymous comment on 2014-02-28 13:55

Modified the package to build correctly

yhager commented on 2014-02-06 13:38

I had to modify the PKGBUILD for this to work. Otherwise the resulting package contains no files.

--- PKGBUILD.1 2012-10-27 09:55:17.000000000 -0700
+++ PKGBUILD 2014-02-05 16:10:30.554751354 -0800
@@ -20,31 +20,32 @@
install="$pkgname.install"

build() {
- mkdir -p $startdir/src || return 1
- cd $startdir/src || return 1
- ar -x ../$_filename || return 1
- mkdir -p $startdir/pkg || return 1
- cd $startdir/pkg || return 1
- tar -xzf ../src/data.tar.gz || return 1
+ cd $srcdir
+ ar -x $_filename
+}

- # On x86_64, install in "/usr/lib" instead of "/usr/lib64"
- if [ "$CARCH" == "x86_64" ]; then
- cd usr || return 1
- mv lib64 lib || return 1
- # some links are wrong now - recreate them
- for fn in lib/libbrcolm2.so.1.0.1 \
- lib/libbrscandec2.so.1.0.0 \
- lib/sane/libsane-brother2.so.1.0.7
- do
- # break, if file does not exist
- if [ ! -f $fn ] ; then
- echo "ERROR: $fn does not exist"
- return 1
- fi
- base=`echo $fn | cut -d. -f1`.so
- major=`echo $fn | cut -d. -f3`
- ln -sf `basename $fn` $base || return 1
- ln -sf `basename $fn` $base.$major || return 1
- done
- fi
-}
\ No newline at end of file
+package() {
+ cd $pkgdir
+ tar -xzf $srcdir/data.tar.gz || return 1
+
+ # On x86_64, install in "/usr/lib" instead of "/usr/lib64"
+ if [ "$CARCH" == "x86_64" ]; then
+ cd usr || return 1
+ mv lib64 lib || return 1
+ # some links are wrong now - recreate them
+ for fn in lib/libbrcolm2.so.1.0.1 \
+ lib/libbrscandec2.so.1.0.0 \
+ lib/sane/libsane-brother2.so.1.0.7
+ do
+ # break, if file does not exist
+ if [ ! -f $fn ] ; then
+ echo "ERROR: $fn does not exist"
+ return 1
+ fi
+ base=`echo $fn | cut -d. -f1`.so
+ major=`echo $fn | cut -d. -f3`
+ ln -sf `basename $fn` $base || return 1
+ ln -sf `basename $fn` $base.$major || return 1
+ done
+ fi
+}

flokli commented on 2013-12-30 15:16

@nomisge

You can apply the changes as you described, or delete the whole line.

I tested it on x86_64.

What is needed to get the correct version into AUR?

nomisge commented on 2013-10-30 13:58

@ archlinuxomane

I would not put a "/" before "usr" and than run makepkg as root. It would screw up your system!
Rather put a "$srcdir/" before "usr" and run makepkg as regular user. Or just delete the line, since we're already in the correct dir.

I didn't test this part though, since I have a 32bit system.

archlinuxomane commented on 2013-07-17 15:26

@nomisge

Thanks for the package. You symlink creation for x64 systems has a typo near line 39:
||#On x86_64, install in "/usr/lib" instead of "/usr/lib64"
|| if [ "$CARCH" == "x86_64" ]; then
|| cd usr || return 1

has a "/" missing in before "usr"

It should be noted that your symlink script won't work unless makepkg is started as root.

nomisge commented on 2013-07-14 12:30

I'd like to share an update of the package. It installs in /opt/brother rather than in /usr/local/Brother and comes with patch and .install.
You can inspect the code under following url:

https://www.dropbox.com/s/vl90w8w6fpu2jjr/brscan2-0.2.5-2.src.tar.gz

Please let me know what you think.

xpumax commented on 2013-06-06 23:56

Don't use $srcdir as this is the reason for the empty package.
Instead use $srcdir and $pkgdir.

Here is a PATCH:
http://pastebin.com/8eN4a9UA

--- PKGBUILD 2012-09-01 20:29:38.000000000 +0200
+++ PKGBUILD-fixed 2013-06-07 01:20:18.579236435 +0200
@@ -20,12 +20,12 @@
install="$pkgname.install"

build() {
- mkdir -p $startdir/src || return 1
- cd $startdir/src || return 1
- ar -x ../$_filename || return 1
- mkdir -p $startdir/pkg || return 1
- cd $startdir/pkg || return 1
- tar -xzf ../src/data.tar.gz || return 1
+ mkdir -p $srcdir || return 1
+ cd $srcdir || return 1
+ ar -x $_filename || return 1
+ mkdir -p $pkgdir || return 1
+ cd $pkgdir || return 1
+ tar -xzf $srcdir/data.tar.gz || return 1

# On x86_64, install in "/usr/lib" instead of "/usr/lib64"
if [ "$CARCH" == "x86_64" ]; then

xpumax commented on 2013-06-06 23:53

Don't use $startdir as this is the reason for the empty package. Instead use $srcdir and $pkgdir.

Here is a patch:

--- PKGBUILD 2012-09-01 20:29:38.000000000 +0200
+++ PKGBUILD-fixed 2013-06-07 01:20:18.579236435 +0200
@@ -20,12 +20,12 @@
install="$pkgname.install"

build() {
- mkdir -p $startdir/src || return 1
- cd $startdir/src || return 1
- ar -x ../$_filename || return 1
- mkdir -p $startdir/pkg || return 1
- cd $startdir/pkg || return 1
- tar -xzf ../src/data.tar.gz || return 1
+ mkdir -p $srcdir || return 1
+ cd $srcdir || return 1
+ ar -x $_filename || return 1
+ mkdir -p $pkgdir || return 1
+ cd $pkgdir || return 1
+ tar -xzf $srcdir/data.tar.gz || return 1

# On x86_64, install in "/usr/lib" instead of "/usr/lib64"
if [ "$CARCH" == "x86_64" ]; then

Rachus commented on 2013-05-20 18:09

Thanks progandy, this package seems to work flawlessly. But nevertheless it would be nice to have the AUR package fixed, because then also AUR helper could build it.

Anonymous comment on 2013-05-19 08:38

I agree with Rachus =)
I didn't have competence for debug this myself.

Thank's !

progandy commented on 2013-05-18 13:04

This package builds, but I don't know if it works (I don't have the hardware)
brscan2-0.2.5-2.src.tar.gz
http://www56.zippyshare.com/v/21944833/file.html

Anonymous comment on 2013-05-15 04:32

FVDI is last generation diagnostic interface for vehicles and trucks
produced from our company. It works the same as AVDI(ABRITES Vehicle Diagnostic Interface).
Currently FVDI is distributed with following diagnostic software:
1. ABRITES Commander for VAG - VW, Audi, Seat, Skoda
2. ABRITES Commander for Porsche
3. ABRITES Commander for Mercedes/Smart/Maybach
4. ABRITES Commander for OPEL/VAUXHALL
5. ABRITES Commander for BMW
6. ABRITES Commander for Peugeot/Citroen
7. ABRITES Commander for Fiat/Alfa/Lancia
8. Abrites Commander for Renault
9. Abrites Commander for Toyota/Lexus
10. Abrites Commander for Hyundai/KIA
11. Abrites Commander for Nissan/Infiniti
12. ABRITES TAG Key Tool

Welcome to www.joyoauto.com

Rachus commented on 2013-05-13 16:53

makepkg builds an empty package. Could you please fix that?

Durag commented on 2012-10-14 00:31

@kiodo1981: I just added the instruction.

kiodo1981 commented on 2012-09-12 20:15

please add this instruction to complete the install
sudo /usr/local/Brother/sane/setupSaneScan2 -i in brscan2.install

Durag commented on 2012-09-02 00:13

I adopted the package and corrected the PKGBUILD, so it can be installed again.

dk0r commented on 2012-06-25 16:32

The versioning of this package may be erroneous. The latest brscan2 version from Brother's official site is '0.2.5-1' but this package shows version '0.2.5-2'.
see: http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html

dk0r commented on 2012-06-25 16:31

The versioning of this package may be erroneous. The latest brscan2 version from Brother's official site is '0.2.5-1' but this package uses version '0.2.5-2'.
see: http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html

dk0r commented on 2012-06-25 16:30

The versioning of this package may be erroneous. The latest brscan2 version from Brother's official site is '0.2.5-1' but this packages title uses version '0.2.5-2'.
see: http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html

dk0r commented on 2012-06-25 16:28

The versioning of this package may be erroneous. The latest brscan2 version from Brothers official site is '0.2.5-1' but this packages title uses version '0.2.5-2'.
http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html

dk0r commented on 2012-06-25 16:25

Why is this package titled "brscan2 0.2.5-2" when the latest brscan2 version from Brother is '0.2.5-1'?
http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html

dk0r commented on 2012-06-25 16:24

Why is this package titled "brscan2 0.2.5-2" when the latest brscan2 version on Brother's site is '0.2.5-1' from 16-December 2009?
http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html

kiodo1981 commented on 2012-03-26 15:45

This is new archive:
1. fix bug PKGBUILD
2. add /usr/local/Brother/sane/setupSaneScan2 -i in brscan2.install
http://www.2shared.com/file/1cF-OZ15/brscan2-025-2srctar.html

kozaki commented on 2012-03-12 15:42

1. Install worked after removing the brackets as Timseal wrote --thanks.
2. Then you just have to run:
/usr/local/Brother/sane/setupSaneScan2 -i
for the scanner to be detected.
As quoted by Kacperas: https://bbs.archlinux.org/viewtopic.php?pid=49663
Hope this is usefull to other this PKGBUILD's users.

timseal commented on 2012-02-09 01:32

The line
install=(brscan2.install)
should change to
install=brscan2.install

https://bbs.archlinux.org/viewtopic.php?pid=1054862#p1054862

Should I adopt this package?

herve commented on 2011-08-21 08:44

Sorry I don't use this package anymore. Feel free to adopt it.

wirew0rm commented on 2011-08-20 23:01

HI,
would it be possible to include a call to "/usr/local/Brother/sane/setupSaneScan2 -i" as postinstall?

regards,
wirew0rm