LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   android-tools fails build error 1 (https://www.linuxquestions.org/questions/slackware-14/android-tools-fails-build-error-1-a-4175542735/)

NightSky 05-16-2015 12:04 AM

android-tools fails build error 1
 
Running slackware64 13.37, kernel 2.6.37, downloaded android-tools from slackbuilds which I placed in /home/user/android-tools and failed to build a pkg. Build output where things went south but I don't understand it. If some could please help me understand what I need to do to build ADB & fastboot tool. So I can to root a OnePlus one phone. Thank you

Code:

cc -o fastboot -I../include -I../libsparse/include -I../mkbootimg -I../../extras/ext4_utils -I../../extras/f2fs_utils/ -I../../libselinux/include -I../../f2fs-tools/include -I../../f2fs-tools/mkfs -DHAVE_OFF64_T=1  -std=gnu99  -c -o label_file.o ../../libselinux/src/label_file.c
../../libselinux/src/label_file.c: In function 'closef':
../../libselinux/src/label_file.c:558:4: warning: implicit declaration of function 'pcre_free_study'
cc -o fastboot -I../include -I../libsparse/include -I../mkbootimg -I../../extras/ext4_utils -I../../extras/f2fs_utils/ -I../../libselinux/include -I../../f2fs-tools/include -I../../f2fs-tools/mkfs -DHAVE_OFF64_T=1 -std=gnu99  bootimg.o engine.o fastboot.o protocol.o usb_linux.o util_linux.o util.o fs.o backed_block.o output_file.o sparse.o sparse_crc32.o sparse_err.o sparse_read.o centraldir.o zipfile.o allocate.o contents.o crc16.o ext4_utils.o ext4_sb.o extent.o indirect.o make_ext4fs.o sha1.o uuid.o wipe.o f2fs_utils.o f2fs_dlutils.o f2fs_ioutils.o callbacks.o check_context.o freecon.o init.o label.o label_android_property.o label_file.o -lz -ldl -lpcre
label_file.o: In function `closef':
label_file.c:(.text+0x1555): undefined reference to `pcre_free_study'
collect2: ld returned 1 exit status
make: *** [fastboot] Error 1
make: Leaving directory `/tmp/SBo/android-tools/core/fastboot'


willysr 05-16-2015 01:17 AM

Did you download slackbuild for 14.1 and try to run it for 13.37?
While some packages might work fine, it doesn't apply to all previous releases because it was tested for spesific version

NightSky 05-16-2015 11:14 AM

Thank you, @Willysr Yes exactly what i did, as I'm desperately trying to get ADB & Fastboot to work on any old computer. Vista is out the window, G4 Laptop OSx 10.4, or this Slackware64-13.37. Downloaded this: https://code.google.com/p/adb-fastboot-install/ last night, will try another:http://www.droidviews.com/a-comprehe...-and-commands/
Considering removing OS X 10.4 from Mac Laptop & installing an easier stable OS with easy access repository, Ubantu? Debian? Linux Mint? OS X is too old & I'm not familiar enough with that OS to update it & keep 10.4 integrity.

moisespedro 05-16-2015 11:47 AM

Can't you upgrade Slackware?

NightSky 05-16-2015 12:16 PM

I should be able use slackpkg to upgrade to Slackware64-14.1? Looking for an easy upgrade process or script as an option to get working ADB & Fastboot tools. Not crazy about changing things around once things are setup & working. lol

NightSky 05-16-2015 12:21 PM

@moisespedro you posted while I was researching that option. Looking for instructions & or upgrading script. Can u point me towards either? Any input is appreciated. Thank you

moisespedro 05-16-2015 01:59 PM

As far as I am aware you would have to upgrade to 14.0 and then to 14.1

Pat himself has instructions for both:

From 13.37 to 14.0
From 14.0 to 14.1

willysr 05-16-2015 02:34 PM

yes, please upgrade from one version to another, don't jump version
i used that method to upgrade one of my server from 12.2 to 14.0 and it worked with a very minimum downtime :)

NightSky 05-16-2015 04:11 PM

Thank you, Printed out the related instructions for the 2 upgrade versions. Reading & re-reading. Not clear on 2 points?
A) Can I Create /root/slackware-64 from my 13.37DVD? Don't have 14.0 or 14.1 CDs or DVDs will the mere directory structure work? Do I have to download all the 14.0 files to my /root/slackware directory first or will slackpkg do that?
Code:

bash-4.1#cp slackware /root/
Is this correct? Everything for Slackware64-14.0 will be downloaded here first?

B) Have a seperate /boot partition, just blacklist the kernels in slackpkg? just download the new kernel & source to recompile before my first boot?

willysr 05-16-2015 07:07 PM

what i did was:
Code:

edit /etc/slackpkg/mirrors to point to which Slackware version and repository you want to use
slackpkg update gpg (grab the latest Slackware GPG key)
slackpkg update (update your local repository metadata)
slackpkg install-new (install new packages introduced in the new Slackware release)
slackpkg upgrade-all (upgrade all existing packages)
slackpkg clean-system (this will remove non Slackware packages such as SBo packages as well)

repeat that for each jump

NightSky 05-18-2015 06:02 PM

LOL... well I am almost back on track. Had to download 14.1 and do a fresh install. SlackBuild of Android-Tools worked this time.
Trying to figure out how to put /usr/bin in my bash terminal path
[email]user@host>$...Is /usr/bin in my Path already?

Quote:

Originally Posted by sgosnell (Post 5289338)
You can either put the executable adb in /usr/bin or in a directory in your /home hierarchy. Putting it in /usr/bin lets you easily call it from anywhere, since it will be in the path. All you really need for working with Android devices as a user are adb and fastboot. You only need the full sdk if you're going to develop Android software.


Then I'll will give it a whirl ;) Keep those toes crossed.

moisespedro 05-18-2015 06:07 PM

But /usr/bin is already part of the PATH

NightSky 05-18-2015 07:29 PM

First run
Tried both as User & Root ;)

Code:

bash-4.2# adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached

bash-4.2# fastboot devices
bash-4.2# adb reboot bootloader
error: device not found
bash-4.2# adb reboot bootloader
error: device not found
bash-4.2# fastboot reboot
< waiting for device >

Any help? I did put the following int0 .bashrc:
Code:

# Add bin to Path variable:
export PATH="$PATH: /sbin:/usr/sbin:$HOME/bin"
#
#export PATH="PATH:$HOME/bin"
#
export PATH=$PATH:/usr/bin/adb adb
#
export PATH=$PATH:/usr/bin/fastboot fastboot
#
export PATH=$PATH:/art/.android-tools/
#
#export PATH=$PATH:/path/to/dir

OnePlus One telephone settings are all properly set. I'm going to reboot PC & Phone then check back here. Do I need to setup the UDEV 50 rules or something I read in anther post.

willysr 05-18-2015 07:54 PM

no space between $PATH: and next path

NightSky 05-18-2015 10:42 PM

Removed the space and apparently redundant PATH=PATH lines from bashrc it didn't fix lack of communication between Phone & PC :( Trying to figureout what lines I need to add to UDEV & how? Phone is just sitting on fastboot mode. Bash freezes waiting for device. How do I back out of frozen bash?
OTA updates are apparently working. Does it make a difference I have no service micro card in the slot? Phone can connect to my WiFi, I disabled it because google is constantly in there messing with software. Even when I turn off the CM Auto Update Option.


All times are GMT -5. The time now is 07:00 PM.