Recent

Author Topic: "Synchronizing" Lazarus installation across multiple computers/Windows versions  (Read 30969 times)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
If I run the "make clean all" from the g:\Lazarus directory it picks up the Borland make and fails as indicated earlier with hundreds of errors.

You should also read the answers you get...
Either edit your PATH as BigChimp suggested, or follow my advice which I repeat here:
 - you can delete or rename the Delphi's "make". Very likely you will not need it.

Quote
Thanks for the pointers.  I am a long retired, long time DOS/Windows user and was a professional software developer in the aerospace industry on many OSs but never had any exposure to Unix in the 32 years I did that.  My goal is to add that to my "resume".  Times may get rough..... :D

Many things in Lazarus development become easier with Linux. There is no Delphi's "make" for starters. The cmd shell works better. Debugger works better. Many developers use it because it is simply better for this task.

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

ARYLIOA

  • New Member
  • *
  • Posts: 23
I have been trying everything that has been suggested.  Sorry to say, so far, nothing has fixed the main problem, installing RichMemo into the Windows 7 hosted Lazarus.  I'm not complaining, just commenting. I appreciate any and all suggestions.  If nothing else, I am getting a crash course on some stuff I have never encountered before.

I removed the Borland binary from both the Windows 7 path and the DOS path.  Then make was an undefined command as far as DOS knew even though one was in a sub-directory.  Again, it looks like the search starts at the root and stops if it hasn't found one by the time it gets to the current directory.  I don't know that, but it sure looks that way.

Edit: one of the first things I tried to force the proper make was to rename the Delphi make make.xex.  That worked just as I described above for the tests with the path modified.

So, I explicitly addressed the make in that directory using the command g:\Lazarus\fpc\2.6.0\bin\i386-win32\make clean all.   Those two lines which I thought were errors still appeared, but on your advice I ignored it and looked at the new executable and it was just built.  So far, so good.

Figuring I now had a clean copy and could add RichMenu to it, I went back to the IDE and tried Tools > Build Lazarus with profile: Build IDE with Packages.  It failed after many of what looked like "typical" compiler messages went by.   The last message that looked "typical" was:
  "Compiling package: SQLDBLaz 1.0.1 completed"
That is followed by the error line I have been fighting all along:
  "Make.exe[2]:***[Lazarus.exe] Error 1"

I even tried building the entire system while in the IDE by using Tools > Configure Build Lazarus > Clean up + Build all. .  It "appears" to end with the message:
  "g:\Lazarus\fpc\2.6.0\bin\i386-win32\make.exe: Leaving directory 'G:\lazarus\examples"
I say "seems" since it just sits there at that point and doesn't restart Lazarus.  That may be the normal end.

But RichMemo, and quite a few other packages are still marked with a "+" if I look at the Packages > Install/Uninstall Packages window.  If I then try to run Tools > Build Lazarus with profile: Build IDE with Packages it compiles a couple packages.  Then I get the identical results as before.  The last compilation message is:
  "Compiling package: SQLDBLaz 1.0.1 completed"
That is followed by the error line I have been fighting all along:
  "Make.exe[2]:***[Lazarus.exe] Error 1"

That's where the problem stands for now.  I hope you see that I haven't been sitting around awaiting a miracle.
« Last Edit: May 10, 2012, 03:10:32 pm by ARYLIOA »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Make sure you have
  G:\Lazarus\fpc\2.6.0\bin\i386-win32\
in PATH. It should be there after installing FPC but who knows.

On Linux you could run "which make" to find out which make command gets called.

Juha
« Last Edit: May 11, 2012, 12:37:03 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Quote
I hope you see that I haven't been sitting around awaiting a miracle
No, seems like you're trying hard enough. And I think you're going in the right direction, too.

Just FYI:
Quote
I removed the Borland binary from both the Windows 7 path and the DOS path.
There is no "Windows path" and "DOS path". There is a system-wide path and user-specific paths, which get combined to give the effective path.

Make clean doesn't always clean up everything. You can also try make distclean.. and then rebuild Lazarus etc.

If you still have problems, you might try renaming the settings directory (probably something like C:\Users\<username>\AppData\Local\lazarus) for that Lazarus, try make distclean etc again, run Lazarus and recompile a clean IDE, then add only the richmemo package, and try to rebuild.

I think this might be mentioned on the wiki, but am too lazy to check right now...

Of course, you could get even more drastic and rename/wipe the settings dir, delete the entire Lazarus dir and reinstall Lazarus to try again.

Good luck & keep us posted...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

ARYLIOA

  • New Member
  • *
  • Posts: 23
Quote
I removed the Borland binary from both the Windows 7 path and the DOS path.
There is no "Windows path" and "DOS path". There is a system-wide path and user-specific paths, which get combined to give the effective path.

If I use My Computer > Properties > etc.... there is an entirely different path than from Run > cmd > path.  It may be possible that if I am running from Windows those are combined, but are they when running DOS from the cmd line?  It looks like Windows and Windows installer can alter the DOS path, but if I remove things there, I believe they are gone when I work at the cmd level.  They aren't shown in the path any longer.

That is why I changed both paths to be sure Borland was missing from both.  It did prevent execution of  the "wrong" make, but did not find the "right" make at that point, requiring me to use full addressing to the correct one.  Putting that file structure in the path also works to find it.  All this because Microsoft still has a core system structure dating to what, 1983 or so?

Right now, it appears that the IDE is using the proper version of make but something else, some stray flag someplace on G: or maybe even on another partition seems to cause it trouble.  The build works fine from the cmd line but goes south if used in the IDE.  Is there a way to force an install of RichMemo from the cmd line?  I suppose I could edit the makefile but the warnings at the top of it, and the unfamiliar syntax has me cautious about that.

I'm pressing on.  I remember that in the early days we used to say we had to hold our mouth just the right way to make complilers work.  I am starting facial exercises today. %)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
If you change paths they don't immediately propagate... I think you might need to log off and on for user paths, perhaps reboot for system-wide paths.
Existing cmd sessions won't change either, IIRC.
You can always reboot for good measure and to remind yourself you're using Windows ;)

As I can't remember these things (and because used to use DOS a lot), I keep as much out of the paths as possible...

As for core structures dating to 1983... wait till you try Linux :)

You'll have to get your IDE in shape, otherwise you can't rebuild it when adding packages etc. I'd stay away from the make file.
Is it a standard install and the only Lazarus on that machine?

Assuming you've tried make distclean all, why don't you try to rebuild a regular IDE first: Tools/Configure Build Lazarus, choose Normal IDE profile.
Then Tools/Build Lazarus with profile Normal IDE.
If that fails, you can post the messages that appear in the message window...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

ARYLIOA

  • New Member
  • *
  • Posts: 23
As for core structures dating to 1983... wait till you try Linux :)

But Microsoft claims to the world's leader in software development.  And they are sitting on tons of money, quite a bit of it mine.  By the time Vista hit the market they were due for a re-write of the core.

Anyway, back to Alfred in Wonderland.  Things are sure getting "curiouser and curiouser".  I did a make distclean all at the cmd level.  That worked.  So does make clean all.

But now something has changed and any attempt to build in the IDE ends with this as the last "successful" message:
   "Compiling package LazControls 0.0 completed
Followed by:
  "Error: Illegal parameter -w"

I did my daily uninstall, reinstall, and it still does that.  If I look in the makefile in G:\Lazarus I find these lines:
.PHONY: fpc_info
fpc_info: $(INFORULES)
.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
   fpc_makefile_dirs
fpc_makefile:
   $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
fpc_makefile_sub1:
ifdef TARGET_DIRS
   $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
endif
ifdef TARGET_EXAMPLEDIRS
   $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
endif

I don't know if they are the ones causing the error or not.  And, of course, there are many makefiles in Lazarus directory tree.  Due to the "new and improved" search Microsoft sold us from Vista on, I have yet to be able to locate any files in the Lazarus directory tree that contain LazControls to find out what is invoking the compile and link sequence.  No wonder I prefer XP.

The good news is that during lulls in contemplating blowing my (Windows 7) brains out, I am converting some Delphi on my XP installation.  I am also looking for an explorer replacement for my Vista and Windows 7 systems.

ARYLIOA

  • New Member
  • *
  • Posts: 23
I am still trying to find the makefile(s) that may be giving me trouble.  I thought maybe I could get on the trail if I could find out the location which invoked the last successful compilation.

I haven't used grep for 20 years.  Like I said, I was never really exposed to Unix.  If I am at the Lazarus top-level directory shouldn't grep -i -H LazControls *.* return a list of the files that contain the string?  What I get is a list of subdirectories.  Am I mixing Unix and DOS poorly here, or missing something else?  Do I really have to look in each sub-directory individually?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
I always use something like grep -i --recursive LaControls *
-i: case-insensitve search
--recursive: also search through subdirectories
* instead of *.* as it seems more Unixy (actually I think *.* might work too).

Let's go back a bit: you are trying to do this from a snapshot install or some release install?

Try the latest snapshot or, conversely, the latest release version (I know this may hinder keeping stuff in sync later on but if you can't add your components that will be irrelevant anyway).
Also remove your Lazarus settings directory before installing.

You are installing Lazarus in a directory without spaces?
On a local drive?
Or on a network drive?
What does fpc -iW and fpc -iSP return?
In your existing Lazarus, which Lazarus version and FPC version (which shows with which compiler that Lazarus was built, IIUC) is shown in Help/About?
(Perhaps asking things you already indicated, but it's getting to be a long thread).

As an alternative, you might want to give Ludob and my fpcup a go, which will install a parallel installation of Lazarus/FPC into c:\development\lazarus, c:\development\fpc and utilities (make, grep etc) c:\development\fpcbootstrap. It won't mess with your path or your primary Lazarus settings though, so you can remove those directories without problem.
You can also change the dirs, see the --lazdir, --fpcdir, --fpcbootstrapdir (IIRC), --binutilsdir (IIRC) options as shown in fpcup --help
By default, fpcup will download trunk/latest development Lazarus and FPC fixes 2.6 (=FPC 2.6.1), which seems to be fairly stable.
If this works, you could try to copy over the Lazarus directory fpcup generated over g:...lazarus (without overwriting the fpc subdirectory there).
Then restart that g:...lazarus, check the compiler settings (should still point to the fpc compiler in g...fpc), rebuild Lazarus from IDE to recompile everything with the g...fpc compiler.

Of course, if fpcup works for you you could switch to that, too ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

ARYLIOA

  • New Member
  • *
  • Posts: 23
Red is in-context response by ARYLIOA
I always use something like grep -i --recursive LaControls *
-i: case-insensitve search
--recursive: also search through subdirectories
* instead of *.* as it seems more Unixy (actually I think *.* might work too). It does.

Missed that..... get hundreds of hits, more than I care to or even know how to chase down.

Let's go back a bit: you are trying to do this from a snapshot install or some release install?

Release 0.9.30.4 from sourceforge.  (To go back all the way, I have added a recap here also.)

Try the latest snapshot or, conversely, the latest release version (I know this may hinder keeping stuff in sync later on but if you can't add your components that will be irrelevant anyway).
Also remove your Lazarus settings directory before installing.

You are installing Lazarus in a directory without spaces? Yes.
On a local drive? Yes (To Windows 7 on a Vista (c:)/Windows 7 (G:) dual boot system with Lazarus up and working on the C: partition under Vista.)
Or on a network drive? No
What does fpc -iW  2.6.0 and fpc -iSP return? i386
In your existing Lazarus, which Lazarus version and FPC version (which shows with which compiler that Lazarus was built, IIUC) is shown in Help/About? Same as above plus SVN Rev. 35940
(Perhaps asking things you already indicated, but it's getting to be a long thread).  I agree. Hopefully recap will help with that.
As an alternative, you might want to give Ludob and my fpcup a go, which will install a parallel installation of Lazarus/FPC into c:\development\lazarus, c:\development\fpc and utilities (make, grep etc) c:\development\fpcbootstrap. It won't mess with your path or your primary Lazarus settings though, so you can remove those directories without problem.
You can also change the dirs, see the --lazdir, --fpcdir, --fpcbootstrapdir (IIRC), --binutilsdir (IIRC) options as shown in fpcup --help
By default, fpcup will download trunk/latest development Lazarus and FPC fixes 2.6 (=FPC 2.6.1), which seems to be fairly stable.
If this works, you could try to copy over the Lazarus directory fpcup generated over g:...lazarus (without overwriting the fpc subdirectory there).
Then restart that g:...lazarus, check the compiler settings (should still point to the fpc compiler in g...fpc), rebuild Lazarus from IDE to recompile everything with the g...fpc compiler.

Of course, if fpcup works for you you could switch to that, too ;) How can I edit the .ini file to load the development system to G: just to make sure it doesn't get involved with the current installation on C:?  It might not matter, but as strange as this whole problem has been, it might be safer.
This thread is getting to be a lot to read so here is a brief(er) recap.

The first goal was to see if Lazarus could be installed on my network drive so all computers with access to it could run a common image.  I already had successfully installed Lazarus and installed RichMemo to Vista (C:) on a dual-boot Vista/Windows 7 computer.  I then loaded Lazarus on an XP machine using my Network Drive (N:) as the target.  That worked.  I then loaded it to the dual-boot Windows 7 OS using N: as the target also.  That worked.  However, when I installed a package on the XP machine, which worked, the Windows 7 machine did not also get the update.  Apparently enough information is stored in my User structure on each OS that making the installation common is not an easy job.  At that point I decided to just do conventional installations on my computer/OS combinations.

As a start, I removed both installations referring to the network drive.  I reinstalled on the XP machine and installed the RichMemo package with no problem.  However, since that time, I can load the system to Windows 7 (G:) but it fails with errors when trying to install RichMemo.  So far, I have not been able to determine and fix the problem.  There have been several problems resolved, like paths to the make executable, but those seem to have been incidental.  But may have (likely has?) corrupted something.

I have uninstalled, deleted all G: files related to Lazarus and even removed all references to Lazarus from the Registry.  None of that changes the behavior when I reinstall

Once I try to install RichMemo, it appears in the Install/Uninstall list but any build attempted from the IDE fails.  I can rebuild the system at the cmd level by using any of several combination of make.  That makes a clean copy which will immediately fail again if I try to install RichMemo.

Is there anyone out there who actually has Lazarus on a Vista/Windows 7 dual-boot setup?  Maybe the whole thing is impossible for some unknown quirk in Windows (nah, no quirks in Windows %)).

I hate to cross-post, but I think I will pose that question to the community.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Quote
I have uninstalled, deleted all G: files related to Lazarus and even removed all references to Lazarus from the Registry.  None of that changes the behavior when I reinstall

Just to be clear: AFAIK, Lazarus doesn't store anything in the registry. File type associations (e.g. open .lpr with Lazarus.exe go there, but these are kept there for all associations.
Your settings are in a different directory (primary config path), see above in this thread.
If you want to completely erase all trace of Lazarus, you have to delete (or rename) that settings directory as well.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

ARYLIOA

  • New Member
  • *
  • Posts: 23
I didn't keep track of what I found in the Registry but it may have been just normal system references to directories and such.  I did find about 8 or 9 both in keys and values and deleted them on the assumption I could always restore the partition's image from a backup if all else failed.

ARYLIOA

  • New Member
  • *
  • Posts: 23
More information, perhaps not useful but reported in the event it might be.

The "Error: Illegal parameter -w" was a red herring.  In all the changes I had made I had made an error in the IDE Environment Make Path.  After correcting the path that error is gone but I am back at the error "Make.exe[2]:***[Lazarus.exe] Error 1".

I tried deleting the entire Lazarus directory structure in my USERS account.  That results in only 5 or 6 packages being installed.  If I try to install even one more from the Packages menu, the build fails with the "Make.exe[2]:***[Lazarus.exe] Error 1" error.

Grasping at straws, I started progressively using the IDE to build portions of the system.  I started with the Build LCL option.  I progressivelyadded pieces to the build.  First Package Registration, then IDE Interface, then SynEdit, then IDE.  Until adding IDE everything appears to run properly.  At that point the build ends in the "Make.exe[2]:***[Lazarus.exe] Error 1" error.  If I remove IDE and add Examples, that seems to work also.  This behavior is the same whether with packages is checked or not or whether the Clean + Build option is used for each item in the builds.

I can use make clean all or make cleanlaz all from the DOS window at any time and it always succeeds except if the IDE is running in Windows.  I did that on the theory that Windows had the executable locked and the build was trying to replace it.  Those makes fail as well, and with the error  "Make.exe[2]:***[Lazarus.exe] Error 1"!  Whether that is indicitive of a similar problem building within the is beyond my level of experience to determine.  Gut it is reinforced in my mind because I do notice on the other systems that the link seems to be making a temporary ...new.exe, probably being renamed during the restart after the build.  I never get that far on the Windows 7 installation.

No one has yet tosay exactly what the "Make.exe[2]:***[Lazarus.exe] Error 1" means, but perhaps it has to do with the IDE executable being locked and the build process cannot replace it. I know that does not happen in any of the other three installations (XP, XP, and the Vista OS on the dual-boot computer where Windows 7 is causing all this turmoil.


BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
I'd like to repeat a previous suggestion: try fpcup.

Also, if you delete the Lazarus settings dir from c:\users...bla, you are also removing info on which compiler to use etc. If you then use the IDE to recompile anything it probably won't work as you found out.
Do a
make distclean
make all
make bigide
(experts will tell me some of these can be combined)
to clean up old .ppu (package) files, build a clean Lazarus IDE and then build the IDE with some packages installed - the same set of packages you get when you install a snapshot or stable version.

At this point, you're better off reading the documentation on getting an SVN version as you are basically rebuilding Lazarus from scratch.

As I mentioned, I would give fpcup a go to see if it gets you to a working separate Lazarus install where you can install your packages again.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
ARYLIOA, I also recommend you follow BigChimp's advice.
I have not used fpcup myself because my tool-chain already works well, but I believe it is a good tool.
I feel you are still in a "write-only" mode. You do your own things and then write long storied about it, not paying attention to advice from other people.
Please switch to "read-write" mode.

Loading and building Lazarus from SVN server is rather easy once you have FPC installed, also without fpcup.
In any case you should switch to a new SVN version of Lazarus, either the development "trunk" branch or the 1.0 fixes branch.
  http://wiki.lazarus.freepascal.org/Lazarus_1.0_fixes_branch
Lazarus 1.0 will be released from it.
Unfortunately Lazarus releases happen seldom and 0.9.30.x is already old.
So, if you must struggle, at least struggle with a recent version.
New Lazarus code has improvements especially for building and installation. For example all packages, including LCL, are now "normal" packages and will be built automatically when needed. And many other improvements...

Regards,
Juha

P.S.
One thing about DOS / Windows:
Windows has not used DOS anymore since Windows98. The old Windows versions indeed were just GUIs built on top of DOS but more recent versions are based on Windows NT and have a much better design.
The command prompt looks like a DOS prompt but it does not use DOS. In some cases it makes a big difference.

Changing a system-wide PATH affects only programs started after the change. This is true in any OS.
« Last Edit: May 15, 2012, 09:17:55 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018