Author Topic: Project Dependencies Not Building  (Read 11005 times)

spowers

  • Community Member
  • Posts: 46
  • Hero Points: 0
Project Dependencies Not Building
« on: April 08, 2008, 05:25:39 PM »
I have a serries of projects all using "Build without a makefile"

One Project "AppProjA" has several dependencies all getting built to static libraries. Some of those dependencies have dependencies below it

The problem happens when I change source code in a dependency and Build AppProjA none of the dependencies are detected as changed. And when they are AppProjA does not link.
I can see the compiler checking each of the projects but it replies with: "All files are up-to-date". If I manually build one of the projects that has changed it will then build it correctly. Then when I try to build AppProjA it will reply with "All files are up-to-date" I have to physically change a character in the source code of AppProjA in order to get it to link again with a changed dependency lib.

Does anyone know of a fix for this?????? Its a major PITA!




PouncingPanda

  • Community Member
  • Posts: 74
  • Hero Points: 2
Re: Project Dependencies Not Building
« Reply #1 on: April 09, 2008, 02:27:28 AM »
I am observing the same behavior and I agree, it is a pain.  My situation is slightly different - my library-generating projects has "build with a automagically maintained makefile" whereas the .exe-generating program that depends on it is of "Build without a makefile".  I observe the same behavior - no rebuild. 

My workaround is to manually include the .a (or .lib) output of the first into the second project.  That way when the file modification date of the library changes the dependency automatically detects that one of its "sources" has changed.  Hack I know but works.

spowers

  • Community Member
  • Posts: 46
  • Hero Points: 0
Re: Project Dependencies Not Building
« Reply #2 on: April 10, 2008, 07:13:28 PM »
manually include...? as you would manually include a source file??

spowers

  • Community Member
  • Posts: 46
  • Hero Points: 0
Re: Project Dependencies Not Building
« Reply #3 on: April 14, 2008, 04:21:11 PM »
bump

PouncingPanda

  • Community Member
  • Posts: 74
  • Hero Points: 2
Re: Project Dependencies Not Building
« Reply #4 on: April 14, 2008, 07:54:58 PM »
Yes.  I know that sounds wierd (don't remove it from the linked in libraries) but manually including it as though it were a source file has this effect:
1) the file appears in the "Other files" section of the project
2) the build process checks the file modification date of all included files (including this one) for a change since last build and
3) if the .a / .lib file has been modified since the dependant project was last build forces a new build (re-link).

So, strange and hacky though it is, it works.  It has the side-effect that the "Rebuild All" instruction does not rebuild the project that creates the lib.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Project Dependencies Not Building
« Reply #5 on: April 15, 2008, 06:12:40 PM »
Is this something that you are able send through support (support@slickedit.com)?  I'll need more information to help you, like logs of the build output, and at least some info on how this project and file are related through dependencies.  You can try deleting the .vpb files that are generated, that will force the dependency database to rebuild and see if that helps.  We will gladly accept any reproducible examples of this behavior and attempt to correct the problem.

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: Project Dependencies Not Building
« Reply #6 on: April 15, 2008, 07:13:45 PM »
Quote
One Project "AppProjA" has several dependencies all getting built to static libraries.

Does "AppProjA" have those static libraries in it's Libraries/Objects list?  (Project > Project Properties, Compile/Link tab)?  Are they included in the list in a manner that gives vsbuild a chance at finding the libraries and checking their modification dates?

spowers

  • Community Member
  • Posts: 46
  • Hero Points: 0
Re: Project Dependencies Not Building
« Reply #7 on: April 22, 2008, 03:15:42 PM »
They are included using -l flags

exampleX are projects the App would depend on.

aka -lexample1 -lexample2 -lexample3 (for release)
-lexample1d -lexample2d -lexample3d (for debug)

I'm not sure what "Are they included in the list in a manner that gives vsbuild a chance at finding the libraries and checking their modification dates?" means.

It seems like if a dependency is built then the app should recognize that and rebuild.

spowers

  • Community Member
  • Posts: 46
  • Hero Points: 0
Re: Project Dependencies Not Building
« Reply #8 on: April 23, 2008, 01:01:22 PM »
bump for an answer

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Project Dependencies Not Building
« Reply #9 on: April 23, 2008, 01:13:01 PM »
Quick question, you do have the dependencies set in Project > Dependencies... (Project Properties > Dependencies tab) set correctly for the projects in the workspace for the Configuration your building?

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
Re: Project Dependencies Not Building
« Reply #10 on: May 05, 2008, 06:59:04 PM »
Quote
They are included using -l flags

exampleX are projects the App would depend on.

aka -lexample1 -lexample2 -lexample3 (for release)
-lexample1d -lexample2d -lexample3d (for debug)

I'm not sure what "Are they included in the list in a manner that gives vsbuild a chance at finding the libraries and checking their modification dates?" means.

It seems like if a dependency is built then the app should recognize that and rebuild.

Well, yes and no.  Ideally, yes, vsbuild would be able to infer from your -l directives and the library search path where the library was located and add it to the dependencies for relinking your application, so we knew to relink when the library was modified.  I would have to do more testing there may be some things that could stand improvement there, especially with respect to parsing the library path arguments (-L or -R).  I can tell you that the way we use vsbuild with dependencies in our project is by specifying the full path to the library we want to link with instead of using -l<lib>.  This way vsbuild knows exactly which file to test the modification date of.

The other thing to keep in mind that a dependency is abstractly just saying "execute this build target before you build me".  The build target could be anything, one of our projects, a makefile, or something else.  The vsbuild tool doesn't know.  It also doesn't know if building the dependency actually did anything, or if it was already up to date.  Just saying build the dependency does not mean we have to relink.  Sure we could add a lot of complexity to make the dependency report what it did, but it wouldn't help any with makefiles and other custom build tools.

So, my advice would be to try changing -lexample1 -lexample2 -lexample3 to "<path1>/libexample1.a <path2>/libexample2.a <path3>libexample3.a", and see if that helps.  If it does, then your original projects are a great test case to send us where the -l logic is failing to find the libraries, and we can try to figure out why from that point.

spowers

  • Community Member
  • Posts: 46
  • Hero Points: 0
Re: Project Dependencies Not Building
« Reply #11 on: June 19, 2008, 06:18:26 PM »
Quick question, you do have the dependencies set in Project > Dependencies... (Project Properties > Dependencies tab) set correctly for the projects in the workspace for the Configuration your building?

yes they are all checked... and they are are all built


The main project simply wont link if the dependencies have changed but its own source has not changed.

It simply says that all files are up to date.

spowers

  • Community Member
  • Posts: 46
  • Hero Points: 0
Re: Project Dependencies Not Building
« Reply #12 on: June 19, 2008, 06:27:25 PM »
Quote
They are included using -l flags

exampleX are projects the App would depend on.

aka -lexample1 -lexample2 -lexample3 (for release)
-lexample1d -lexample2d -lexample3d (for debug)

I'm not sure what "Are they included in the list in a manner that gives vsbuild a chance at finding the libraries and checking their modification dates?" means.

It seems like if a dependency is built then the app should recognize that and rebuild.

Well, yes and no.  Ideally, yes, vsbuild would be able to infer from your -l directives and the library search path where the library was located and add it to the dependencies for relinking your application, so we knew to relink when the library was modified.  I would have to do more testing there may be some things that could stand improvement there, especially with respect to parsing the library path arguments (-L or -R).  I can tell you that the way we use vsbuild with dependencies in our project is by specifying the full path to the library we want to link with instead of using -l<lib>.  This way vsbuild knows exactly which file to test the modification date of.

The other thing to keep in mind that a dependency is abstractly just saying "execute this build target before you build me".  The build target could be anything, one of our projects, a makefile, or something else.  The vsbuild tool doesn't know.  It also doesn't know if building the dependency actually did anything, or if it was already up to date.  Just saying build the dependency does not mean we have to relink.  Sure we could add a lot of complexity to make the dependency report what it did, but it wouldn't help any with makefiles and other custom build tools.

So, my advice would be to try changing -lexample1 -lexample2 -lexample3 to "<path1>/libexample1.a <path2>/libexample2.a <path3>libexample3.a", and see if that helps.  If it does, then your original projects are a great test case to send us where the -l logic is failing to find the libraries, and we can try to figure out why from that point.



I've changed my library includes so it says something like %wp/libfoo.a rather than -lfoo.

The problem still exists.

This is a major annoyance. Most of us would expect a dependency tree to realize when a dependency has been changed and to force a relink. This is the way Visual Studio does it.

spowers

  • Community Member
  • Posts: 46
  • Hero Points: 0
Re: Project Dependencies Not Building
« Reply #13 on: October 07, 2008, 08:33:11 PM »
bump for answer... do the new versions of slick edit have this fixed?

SoftJunkie

  • Community Member
  • Posts: 32
  • Hero Points: 1
Re: Project Dependencies Not Building
« Reply #14 on: May 29, 2009, 05:49:59 PM »
Was there any resolution to this dependency issue? We are experiencing similar behavior.