
When I try the build process with scons, I get a failure when it tries to link the object files together to produce executables. The command... ghc src/compiler98/FixSyntax.o ...(etc)... -o inst/bin/yhc ...complains about... src/compiler98/Front.o(.text+0x155d): In function `s3My_1_alt': : undefined reference to `LanguageziPreprocessorziUnlit_unlit_closure' src/compiler98/Front.o(.text+0x1a56): In function `s3pb_info': : undefined reference to `LanguageziPreprocessorziCpphsziOptions_CpphsMacro_closure' src/compiler98/Front.o(.text+0x1ab1): In function `s3OV_1_alt': ...etc. If I try the command by hand, and add "-package cpphs", I can get a yhc executable. I'm wondering if there is something strange about my setup (Linux, ghc-6.4.2, scons v0.96.1.D001) which would cause this problem, or is there something I can change in the configuration files to get things to build properly? Thanks, Greg Buchholz

Hi
When I try the build process with scons, I get a failure when it tries to link the object files together to produce executables. The command...
Wierd, Yhc tries to link in cpphs directly (not as a package) so you shouldn't have any problem with this. Can you please check that you have a directory depends/cpphs in your repo, which corresponds to the cpphs program's source code. Can you please also give us the entire text of that link command, so we can see if Cpphs is being included or not in the linking. Could you also try doing "scons depends" then "scons" again, to see if this fixes it.
...etc. If I try the command by hand, and add "-package cpphs", I can get a yhc executable.
Hmm, definately sounds like cpphs is being skipped in the link phase. I wonder if this is because you have cpphs installed as a package already?
my setup (Linux, ghc-6.4.2, scons v0.96.1.D001) which would cause this problem, or is there something I can change in the configuration files to get things to build properly?
I can't think of any setup that is more typical for Yhc development! Thanks Neil

Neil Mitchell wrote:
Wierd, Yhc tries to link in cpphs directly (not as a package) so you shouldn't have any problem with this. Can you please check that you have a directory depends/cpphs in your repo, which corresponds to the cpphs program's source code.
Yep. It is there.
Can you please also give us the entire text of that link command, so we can see if Cpphs is being included or not in the linking.
See attached.
Could you also try doing "scons depends" then "scons" again, to see if this fixes it.
~/haskell/YHC/yhc$ scons depends scons: Reading SConscript files ... Checking for architecture... x86 Checking for operating system... linux2 darcs pull --repodir=depends/cpphs Pulling from "http://www.cs.york.ac.uk/fp/darcs/cpphs"... No remote changes to pull in! darcs pull --repodir=depends/filepath Pulling from "http://www.cs.york.ac.uk/fp/darcs/filepath"... No remote changes to pull in! cd depends/ctypes; svn update At revision 52318. scons: done reading SConscript files. scons: Building targets ... scons: Nothing to be done for `depends'. scons: done building targets. ...and trying "scons" again still results in the same problem.
Hmm, definately sounds like cpphs is being skipped in the link phase. I wonder if this is because you have cpphs installed as a package already?
Yes. In my first attempt at compiling yhc a couple of days ago, the process complained about something, which I interpreted as needing to install cpphs, which I then did. The build process was then able to proceed further, up to the point where I'm now at. Thanks, Greg Buchholz

Hi
Can you please also give us the entire text of that link command, so we can see if Cpphs is being included or not in the linking.
See attached.
It's not linked in, so that explains why you were getting that error. Two options: something is failing to generate the object files for cpphs, or something is failing to see them as required for linking.
have a directory depends/cpphs in your repo, which corresponds to the cpphs program's source code.
Yep. It is there.
Can you check if there are any .o files in that directory tree, I would expect some under Language/Haskell/Cpphs or something similar. Also are there any .hi files inside that tree?
Yes. In my first attempt at compiling yhc a couple of days ago, the process complained about something, which I interpreted as needing to install cpphs, which I then did. The build process was then able to proceed further, up to the point where I'm now at.
Hmm, so installing cpphs made the problem go away a bit? That is a bit weird. Do you have any recollection as to what the original problem was? I kind of half suspect there might be two bugs in one here: 1) The initial bug you had a few weeks ago 2) If cpphs is installed, the makefiles don't report it as needed, but it is since we don't include a package directive. I'll try and check if I can replicate this behaviour. Thanks Neil

Neil Mitchell wrote:
It's not linked in, so that explains why you were getting that error. Two options: something is failing to generate the object files for cpphs, or something is failing to see them as required for linking.
have a directory depends/cpphs in your repo, which corresponds to the cpphs program's source code.
Yep. It is there.
Can you check if there are any .o files in that directory tree, I would expect some under Language/Haskell/Cpphs or something similar. Also are there any .hi files inside that tree?
No .o or .hi files in depends/cpphs and I don't have a Cpphs under /usr/local/lib/ghc-6.4.2/imports/Language/Haskell
Hmm, so installing cpphs made the problem go away a bit? That is a bit weird. Do you have any recollection as to what the original problem was?
If I unregister cpphs from ghc, then run "scons" (after a "scons clean") I get the following error... ghc -i./src/compiler98 -idepends/cpphs -idepends/filepath -fwarn-missing-signatures -c src/compiler98/Front.lhs -o src/compiler98/Front.o src/compiler98/Front.lhs:33:1: Failed to load interface for `Language.Preprocessor.Unlit': Could not find module `Language.Preprocessor.Unlit': use -v to see a list of the files searched for scons: *** [src/compiler98/Front.o] Error 1 scons: building terminated because of errors.

Hi
To test I just compiled Yhc after installing cpphs, and it worked
fine. I guess its the same single error being the root cause.
Hopefully Andrew might be able to shed some light on this tomorrow.
Thanks
Neil
On 10/12/06, Greg Buchholz
Neil Mitchell wrote:
It's not linked in, so that explains why you were getting that error. Two options: something is failing to generate the object files for cpphs, or something is failing to see them as required for linking.
have a directory depends/cpphs in your repo, which corresponds to the cpphs program's source code.
Yep. It is there.
Can you check if there are any .o files in that directory tree, I would expect some under Language/Haskell/Cpphs or something similar. Also are there any .hi files inside that tree?
No .o or .hi files in depends/cpphs and I don't have a Cpphs under /usr/local/lib/ghc-6.4.2/imports/Language/Haskell
Hmm, so installing cpphs made the problem go away a bit? That is a bit weird. Do you have any recollection as to what the original problem was?
If I unregister cpphs from ghc, then run "scons" (after a "scons clean") I get the following error...
ghc -i./src/compiler98 -idepends/cpphs -idepends/filepath -fwarn-missing-signatures -c src/compiler98/Front.lhs -o src/compiler98/Front.o
src/compiler98/Front.lhs:33:1: Failed to load interface for `Language.Preprocessor.Unlit': Could not find module `Language.Preprocessor.Unlit': use -v to see a list of the files searched for scons: *** [src/compiler98/Front.o] Error 1 scons: building terminated because of errors.
_______________________________________________ Yhc mailing list Yhc@haskell.org http://www.haskell.org/mailman/listinfo/yhc

Neil Mitchell wrote:
To test I just compiled Yhc after installing cpphs, and it worked fine. I guess its the same single error being the root cause. Hopefully Andrew might be able to shed some light on this tomorrow.
Ah. I'll try to do some more poking around and see what I can find. Thanks, Greg Buchholz

On 10/12/06, Greg Buchholz
Hopefully Andrew might be able to shed some light on this tomorrow.
Well, this shouldn't happen and I've no idea why it is so I can't shed much light on it! It's linking against filepath, but not cpphs yet they are compiled almost identically. Greg, can you run 'scons fullclean' then 'scons' and email me the full output of the 'scons' command. Cheers, Andrew

Andrew Wilkinson wrote:
Greg, can you run 'scons fullclean' then 'scons' and email me the full output of the 'scons' command.
Attached are two (gzipped, to get it by the mailing list) copies of the output of 'scons' after doing an 'scons fullclean'. In one version, I have cpphs installed with GHC using the usual Cabal method, and the other version is without a local version of cpphs. You can also see the files here... http://sleepingsquirrel.org/haskell/with_cpphs.txt http://sleepingsquirrel.org/haskell/no_cpphs.txt Greg Buchholz

Hi,
Attached are two (gzipped, to get it by the mailing list) copies of the output of 'scons' after doing an 'scons fullclean'. In one version, I have cpphs installed with GHC using the usual Cabal method, and the other version is without a local version of cpphs. You can also see the files here...
Ah, that makes the problem a bit clearer. Focusing on the no_cpphs (since thats the "normal" path for installation, although both should work) you can see the bit: darcs get --partial --repo-name=depends/cpphs http://www.cs.york.ac.uk/fp/darcs/cpphs .... Applying patches to the "working" directory... darcs: failed to read patch in get_extra: Thu Apr 22 09:39:38 PDT 2004 malcolm * [cpphs @ 2004-04-22 16:39:38 by malcolm] Initial revision Perhaps this is a 'partial' repository? Thats broken in some way, can you please try upgrading darcs? You are on 1.0.3, and the current version is 1.0.7. There may be some feature on bug in the cpphs repo that breaks darcs below a certain version... Thanks Neil
http://sleepingsquirrel.org/haskell/with_cpphs.txt http://sleepingsquirrel.org/haskell/no_cpphs.txt
Greg Buchholz
_______________________________________________ Yhc mailing list Yhc@haskell.org http://www.haskell.org/mailman/listinfo/yhc

Neil Mitchell wrote:
Thats broken in some way, can you please try upgrading darcs? You are on 1.0.3, and the current version is 1.0.7. There may be some feature on bug in the cpphs repo that breaks darcs below a certain version...
That was apparently the problem. I upgraded darcs to 1.0.8 and now I get a working yhc, yea! Thanks, Greg Buchholz P.S. Interestingly enough, now darcs breaks during part of the process... darcs get --partial --repo-name=depends/filepath http://www.cs.york.ac.uk/fp/darcs/f Copying patch 78 of 78... done! Applying patch 78 of 78... done. darcs: bug in darcs! Impossible case at PatchRead.lhs:56 compiled 08:35:51 Oct 13 2006 Please report this to bugs@darcs.net, If possible include the output of 'darcs --exact-version'.

Neil Mitchell wrote:
Thats broken in some way, can you please try upgrading darcs? You are on 1.0.3, and the current version is 1.0.7. There may be some feature on bug in the cpphs repo that breaks darcs below a certain version...
That was apparently the problem. I upgraded darcs to 1.0.8 and now I get a working yhc, yea! Thanks, Greg Buchholz P.S. Interestingly enough, now darcs breaks during part of the process... darcs get --partial --repo-name=depends/filepath http://www.cs.york.ac.uk/fp/darcs/f Copying patch 78 of 78... done! Applying patch 78 of 78... done. darcs: bug in darcs! Impossible case at PatchRead.lhs:56 compiled 08:35:51 Oct 13 2006 Please report this to bugs@darcs.net, If possible include the output of 'darcs --exact-version'.

Hi
That was apparently the problem. I upgraded darcs to 1.0.8 and now I get a working yhc, yea!
Yay! Not sure if thats a case of darcs 1.0.3 being at fault, or your particular copy - I've never heard of any problems like this before.
P.S. Interestingly enough, now darcs breaks during part of the process...
I suspect that the old (bad) darcs corrupted something, scons fullclean should get you back to a known good state which works. Thanks Neil

On 10/13/06, Greg Buchholz
That was apparently the problem. I upgraded darcs to 1.0.8 and now I get a working yhc, yea!
That's good news! I have added a test to the build script to force people to use a version newer than 1.0.3. I don't know when the problem you experienced was fixed but it's the best we can do. P.S. Interestingly enough, now darcs breaks during part of the
process...
I've never seen that message before, and I use 1.0.8 too. If it still built and the test completed then I don't suppose we should worry about it too much :-) Andrew
participants (4)
-
Andrew Wilkinson
-
Greg Buchholz
-
Greg Buchholz
-
Neil Mitchell