Bug 85737 - bin/gbuild-to-ide includes invalid characters when detecting source and build directory
Summary: bin/gbuild-to-ide includes invalid characters when detecting source and build...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha1
Hardware: x86-64 (AMD64) Cygwin
: medium normal
Assignee: Ashod Nakashian
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-01 15:33 UTC by sorrow17
Modified: 2015-01-10 14:52 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sorrow17 2014-11-01 15:33:38 UTC
When I try to use "/opt/lo/bin/make vs2013-ide-integration" to generate files for Visual Studio development, it print out thousands of lines saying that 

"XXX.cxx in project XXX does not exist". 

Then I open the .sln files in the source directory, nothing is included in the project. But I am quite sure that libreoffce was built within my source directory.
After some investigation, I found something weird. At the "GbuildParser" class in the script "bin/vs2013-ide-integration", it seems to uses a set of regex to match some basic information of the project, such as 

class GbuildParser:

...
    srcdirpattern = re.compile('^SRCDIR = (.*)')
    builddirpattern = re.compile('^BUILDDIR = (.*)')
    instdirpattern = re.compile('^INSTDIR = (.*)')
...

which matches source directory and build directory in makefiles. What make me confused is that it will also include some characters invalid in a path, such as '\n' and '\r' on my computer, so the file searching will fail with these characters in next steps. For example, there is a variable recording the actual source directory called "GbuildParser.srcdir", and it will end up with the charater '\r' on my computer and it will return a invalid path. When I modify the line in "bin/gbuild-to-ide" from 

     self.srcdir = srcdirmatch.group(1)

to

     self.srcdir = srcdirmatch.group(1).strip()

Things get better and all the files are included in the VS project file.

Since I am not familiar with libreoffice source code, I don't know if I am doing the right thing. Could anyone take a look at this? Appreciate your help!
Comment 1 Buovjaga 2014-11-09 19:29:09 UTC
I have to change this to UNCONFIRMED, because we need someone to reproduce the problem before setting to NEW.
Comment 2 Robinson Tryon (qubit) 2014-12-21 19:36:29 UTC
(In reply to sorrow17 from comment #0)
> Since I am not familiar with libreoffice source code, I don't know if I am
> doing the right thing. Could anyone take a look at this? Appreciate your
> help!

Hi Sorrow,

Just so you know:
https://wiki.documentfoundation.org/QA/BugReport#Not_all_bugs_go_to_Bugzilla

For questions/bugs about building LibreOffice, please send email to the Development mailing list:
https://wiki.documentfoundation.org/Development/Mailing_List

Thanks!

Status -> RESOLVED NOTOURBUG
Comment 3 Ashod Nakashian 2015-01-10 14:52:17 UTC
Confirmed, fixed and committed.