Recent

Author Topic: SQLite3Laz 0.4 and Raspberry Pi 2?  (Read 4730 times)

aidv

  • Full Member
  • ***
  • Posts: 173
SQLite3Laz 0.4 and Raspberry Pi 2?
« on: May 01, 2015, 01:46:18 am »
Ok, so after successfully installing Lazarus on my Raspberry Pi 2 I needed get to work ASAP,
but work is halted due to failed installation of the SQLite3Laz 0.4 package.

The error I'm getting is:
 
Code: [Select]
Build IDE: Exit code 512, Errors: 1, Warnings: 1
lazarus.pp(96,31) Warning: Object sqlitecompstrings.o not found, Linking may fail !
/usr/bin/ld warning: ../link.res contains output sections; did you forget -T?
/usr/bin/ld: cannot find sqlitecompstrings.o
lazarus.pp(96,31) Error: Error while linking

What is up with it?

Thaddy

  • Hero Member
  • *****
  • Posts: 10684
Re: SQLite3Laz 0.4 and Raspberry Pi 2?
« Reply #1 on: May 01, 2015, 09:26:26 am »
You either do not have sqlite installed or the linker cannot find the path to the binary.
Lazarus doesn't install sqlite for you, afaik.


$sudo apt-get update
$sudo apt-get install sqlite3

[edit]
and:
$sudo apt-get install libsqlite3-dev

« Last Edit: May 01, 2015, 10:02:27 am by Thaddy »

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9014
  • FPC developer.
Re: SQLite3Laz 0.4 and Raspberry Pi 2?
« Reply #2 on: May 01, 2015, 10:27:18 am »
That sounds like a lazarus unit it can't find. IOW something funky in your lazarus installation.

That unit is part of the "sqlite" package of lazarus. Did you add a dependency from your project to that package?

aidv

  • Full Member
  • ***
  • Posts: 173
Re: SQLite3Laz 0.4 and Raspberry Pi 2?
« Reply #3 on: May 01, 2015, 10:41:29 am »
You either do not have sqlite installed or the linker cannot find the path to the binary.
Lazarus doesn't install sqlite for you, afaik.


$sudo apt-get update
$sudo apt-get install sqlite3

[edit]
and:
$sudo apt-get install libsqlite3-dev



I did that, still getting the same errors.
Also: how can I get the location of where sqlite3 and libsqlite3-dev has been installed?

That sounds like a lazarus unit it can't find. IOW something funky in your lazarus installation.

That unit is part of the "sqlite" package of lazarus. Did you add a dependency from your project to that package?

No I have not been able to use the package in any way so far. I am currently just trying to install it.

Could I download just that specific file from the svn repo and put it in the right place?
If yes, could any of you please help me find the link to that file and tell me where it should be placed so I can try it out?

Thaddy

  • Hero Member
  • *****
  • Posts: 10684
Re: SQLite3Laz 0.4 and Raspberry Pi 2?
« Reply #4 on: May 01, 2015, 12:49:55 pm »
in a terminal type whereis sqlite3

aidv

  • Full Member
  • ***
  • Posts: 173
Re: SQLite3Laz 0.4 and Raspberry Pi 2?
« Reply #5 on: May 01, 2015, 01:05:40 pm »
in a terminal type whereis sqlite3

I got this

Code: [Select]
pi@raspberrypi ~ $ whereis sqlite3
sqlite3: /usr/bin/sqlite3 /usr/bin/X11/sqlite3 /usr/include/sqlite3.h /usr/share/man/man1/sqlite3.1.gz

However I recovered my SD card from a backup that I did right after I successfully installed Lazarus.

The guide that helped me achieve a successful install of Lazarus can be found here: http://www.tweaking4all.com/hardware/raspberry-pi/install-lazarus-pascal-on-raspberry-pi-2/

And Hans (the author) had an article of how to install SQLite3 on Lazarus which can be found here: http://www.tweaking4all.com/software-development/lazarus-development/lazarus-pascal-getting-started-with-sqlite/

And I asked him in the comment section what could be wrong and he replied that I should:
1. Use the command sudo apt-get install sqlite3 libsqlite3-dev to install sqlite3
2. Not install any other SQL components.

At first it didn't work, but after reverting back to a clean install, I followed his proposal and IT WORKED!

I don't know if Marcov was right when he said that there might be something funky with my lazarus installation.

Maybe something screwed it up afterwards? I don't know.

On a side not though: how do I create a clean SQL file to use with my app? Or should I ask that in a different question thread?


aidv

  • Full Member
  • ***
  • Posts: 173
Re: SQLite3Laz 0.4 and Raspberry Pi 2?
« Reply #7 on: May 03, 2015, 07:19:15 pm »
Thanks  :D

 

TinyPortal © 2005-2018