How to config? (and missing wincrt) lazarus / 1-Linux ---------------------------------------------------------------------- ursatempest · 2016-10-15 00:24 Alright, first of let me start by seeing I'm new at Linux. Like, barely three-weeks new. Anyway... So I first installed fpc (I like Lazarus look, but since this is just for my class I don't think I'll need full-blown IDE), throw a simple square area calculator, and see if it compiles. It doesn't. Fpc report missing unit. I googled a bit, and apparently it's common problem. Thing is, I literally don't understand the troubleshooting guide about missing unit on the wiki. Like, it doesn't make sense to me. So I decided to just install every 'unit' plugin on repo, and it still doesn't fixed it. A more thorough googling later, I determined the problem is config file, since it uses .cfg on Documents and /home/ Then I decided to change the config file path, except.. I don't know how! How do I change it? ---------------------------------------------------------------------- lainz · 2016-10-15 00:40 Wincrt http://www.freepascal.org/docs-html/rtl/wincrt/index.html Is for windows. Because that is not available under Linux. ---------------------------------------------------------------------- molly · 2016-10-15 00:42 Hi ursatempest, Your first post and so much trouble already  Being new to linux i can't really help with but you can attempt to figure some things out on your own. For instance, under linux fpc uses the following order as described in this link when searching for it's fpc.cfg file (that is assuming you are using the commandline compiler and not fp-IDE text editor). In addition to that you can add the option -va to your compile instruction so that fpc spills some information at you. Be warned it is a very long list but, you are looking for something at the top, namely which config file it uses (if any). It also shows you where it attempt to find all the files (including fpc.cfg) so that you are able to look for yourself if these directories (and filenames) exist at those locations or not. ---------------------------------------------------------------------- ursatempest · 2016-10-15 00:50 Quote from: lainz on October 15, 2016, 02:40:17 amWincrt http://www.freepascal.org/docs-html/rtl/wincrt/index.html Is for windows. Because that is not available under Linux. Any linux equivalent? crt, maybe? I recall changing it to crt, and it still returns missing unit. EDIT: Oh right, here is the -va result: http://pastebin.com/xJPkHiYw ---------------------------------------------------------------------- lainz · 2016-10-15 00:57 I changed to crt on Ubuntu and it works and compiles, so it's a problem with your configuration or installation. You installed FPC 3.0 and FPC-SRC 3.0 right? Maybe you can uninstall it, to do that I use synaptic package manager, and then install it again. I've installed today on Ubuntu and the installation was with no problems. If problem persist, maybe you want to try installing lazarus too, is just another IDE. ---------------------------------------------------------------------- ursatempest · 2016-10-15 01:00 Quote from: lainz on October 15, 2016, 02:57:03 amI changed to crt on Ubuntu and it works and compiles, so it's a problem with your configuration or installation. You installed FPC 3.0 and FPC-SRC 3.0 right? Maybe you can uninstall it, to do that I use synaptic package manager, and then install it again. I've installed today on Ubuntu and the installation was with no problems. If problem persist, maybe you want to try installing lazarus too, is just another IDE. I did! Many times. Can't remember how many times I've install- reinstall. And yes, I'm fairly sure the problem is config. It's just I don't know how to fix it! ---------------------------------------------------------------------- lainz · 2016-10-15 01:07 Try lazarus. ---------------------------------------------------------------------- Handoko · 2016-10-15 01:10 Hello. I'm not here to provide solution. I'm the unlucky guy too. Now matter how I tried and followed the documentation and forum instructions, I never make CRT work on Ubuntu Mate 64 bit. Hope someone can fix it on the future. Quote from: lainz on October 15, 2016, 03:07:32 amTry lazarus. That's what I used. ---------------------------------------------------------------------- ursatempest · 2016-10-15 01:12 Quote from: lainz on October 15, 2016, 03:07:32 amTry lazarus. Still doesn't work. ---------------------------------------------------------------------- lainz · 2016-10-15 01:16 That's really common and strange. I'm using Ubuntu 32 and Ubuntu 64 version 16.04, and in both I have FPC 3.0 + src + Lazarus 1.6 and working perfectly, installing components, etc. Installed from the download on the sourceforge page not from command line. To rebuild the ide I needed to install this: Quotesudo apt-get install libxtst-dev And then the IDE was built. ---------------------------------------------------------------------- ursatempest · 2016-10-15 01:30 Just uninstall then reinstall Lazarus. Yep, still get 'can't find crt' error. If it helps, Lazarus opened my previous test project, so maybe some part aren't uninstalled. Any way to cleanly remove it? ---------------------------------------------------------------------- molly · 2016-10-15 01:33 @Handoko/ursatempest Hmz, wierd. it should be inside rtl-console directory together with units keyboard, mouse and video. At least for ursatempest: it seems your configuration is ok. At least it finds the other necessary files. For handoko: perhaps rtl-console is disabled for 64 bit targets by default ? ---------------------------------------------------------------------- lainz · 2016-10-15 01:45 Quote from: ursatempest on October 15, 2016, 03:30:31 amJust uninstall then reinstall Lazarus. Yep, still get 'can't find crt' error. If it helps, Lazarus opened my previous test project, so maybe some part aren't uninstalled. Any way to cleanly remove it? Try to uninstall it with synaptic sudo apt-get install synaptic Then search and check for uninstall all the lazarus and fpc stuff. If that doesn't help, open with the program that you use to open zip the deb packages and check inside where are installed and remove them by hand. /etc/lazarus/* /usr/bin/ (just the shortcuts) /usr/share/lazarus/ /usr/share/ (some folders like applications, doc, man, mime, pixmaps) /usr/bin/ (a lot of files) /urs/lib/fpc/* /usr/share/doc/fpc (and) fpc-3.0.0 /usr/share/doc/fpc-src/* /usr/share/fpcsrc/* ---------------------------------------------------------------------- ursatempest · 2016-10-15 01:53 Alright, I've marked and remove them all using Synaptic. Completely remove them, to be precise. It appears there's not-empty folder? http://pastebin.com/fFtWminE I'll see if I can remove them manually. ---------------------------------------------------------------------- molly · 2016-10-15 01:58 @lainz: sorry, now i read (too lat) that you also have 64 bit version installed. Are you sure crt unit is available for that target ? ---------------------------------------------------------------------- ursatempest · 2016-10-15 02:08 Alright, I reinstalled Lazarus after the purge. I got some strange result... especially near the end. http://pastebin.com/TwGeCpQr What's update-alternatives mean anyway? ---------------------------------------------------------------------- lainz · 2016-10-15 02:35 Quote from: molly on October 15, 2016, 03:58:01 am@lainz: sorry, now i read (too lat) that you also have 64 bit version installed. Are you sure crt unit is available for that target ? yes. Quote from: ursatempest on October 15, 2016, 04:08:48 amAlright, I reinstalled Lazarus after the purge. I got some strange result... especially near the end. http://pastebin.com/TwGeCpQr What's update-alternatives mean anyway? http://askubuntu.com/questions/233190/what-exactly-does-update- alternatives-do ---------------------------------------------------------------------- ursatempest · 2016-10-15 02:41 Alright, after I've purged Lazarus it still somehow retain the config and opened the last .pas I opened. ---------------------------------------------------------------------- marcov · 2016-10-15 14:37 Probably somehwere in your homedir there is still configuration ~/lazarus or ~/.config/lazarus or something like that. ---------------------------------------------------------------------- Thaddy · 2016-10-15 15:06 Yes, try: ls -a That will also show hidden stuff. ---------------------------------------------------------------------- ursatempest · 2016-10-15 23:22 So in a fit of madness I decided to just re-install to Ubuntu 16.04! Well, kind of. I'm still in the backing-up process. But anyway... Is there a tutorial of installing FPC and Lazarus on fresh Ubuntu install? Preferably, in the way that's understandable by newb. EDIT: I was checking my Bash history, and... hmm, did I do something wrong? Here is how I install FPC and Lazarus: Code: [Select]sudo apt-get install fp-compiler sudo apt-get install lazarus And then I realized I can't compile a test program, so I decided to remove Lazarus.. Code: [Select]sudo apt-get remove lazarus sudo apt-get remove lazarus-ide sudo apt-get remove lazarus-ide-1.6 sudo apt-get fp-ide sudo apt-get install fp-ide It still doesn't quite work, though. Code: [Select]fpc -vut persegi.pas fpc fp fpc -vut persegi.pas fpc -Fu fpc -Fu persegi.pas So I decided to remove everything again... Code: [Select]sudo apt-get remove fpc sudo apt-get remove fp sudo apt-get remove fp-ide sudo apt-get remove fp-doc cd application cd Application cd fpc ... and installed from tar. In retrospect, I suspect it is one of the terrible decision I made. Code: [Select]sudo sh install.sh fp It's not in the history, but I think this is the part where I try to compile the test pascal again and find out it doesn't work. So I decided to remove it again... Code: [Select]sudo apt-get remove fpc sudo apt autoremove sudo apt-get fpc sudo apt-get fp sudo apt-get remove lazarus sudo apt autoremove sudo apt-get remove fp-compiler sudo apt autoremove But since it's installed from tar, it's not removed, much to my dismay. Code: [Select]fp So I give-up, and decided to just download every vaguely pascal-thing in repo. Code: [Select]sudo apt-get remove fp sudo apt-get remove fp-ide sudo apt-get remove free_pascal apt list --installed >~/Desktop/package apt list --installed sudo apt-get install fp-compiler sudo apt-get install fp-ide sudo apt-get install fp-units-base fp sudo apt-get fp-units-fcl-3.0.0 sudo apt-get install fp-units-fcl-3.0.0 sudo apt-get install fp-units-rtl fp sudo apt-get install fp-units-math sudo apt-get install fp-units-misc fp sudo apt-get remove fp-compiler sudo apt-get remove fp-ide sudo apt autoremove sudo apt-get remove fp-units-base sudo apt-get remove fpc sudo apt-get remove fp-units-math sudo apt autoremove sudo apt-get remove fp-units-misc sudo apt autoremove sudo apt-get remove fp-units-fcl-3.0.0 sudo apt autoremove sudo apt-get remove fp-units-rtl sudo apt autoremove sudo apt-get remove fp-units-fcl-3.0.0 Alas, it's still doesn't work. And that's why I decided to just reinstall everything. ---------------------------------------------------------------------- lainz · 2016-10-15 23:31 Just download the deb and install them in this order: - fpc - fpc-src - lazarus That works for me in Ubuntu 16.04. ---------------------------------------------------------------------- ursatempest · 2016-10-15 23:42 Download from repo, or as .deb files? Thanks! ---------------------------------------------------------------------- lainz · 2016-10-15 23:59 I downloaded from sourceforge. ---------------------------------------------------------------------- ursatempest · 2016-10-16 05:07 I don't see any .deb on /3.0.0/, though? Just .tar and folder marked RPM? ---------------------------------------------------------------------- JuhaManninen · 2016-10-16 08:10 Lazarus project provides single .deb packages for both FPC and Lazarus. See the "Download Now" button in here:  http://www.lazarus-ide.org/ Problems with Ubuntu repo packages has been reported also earlier. I would recommend you switch to another Linux distro. Actually I wonder why so many people use Ubuntu while there are many choices available. Clever marketing from Canonical I guess. ---------------------------------------------------------------------- lainz · 2016-10-16 13:59 Quote from: ursatempest on October 16, 2016, 07:07:10 amI don't see any .deb on /3.0.0/, though? Just .tar and folder marked RPM? For 64 bit https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64 %20DEB/Lazarus%201.6/ For 32 bit https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20i386% 20DEB/Lazarus%201.6/