Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake issue: Drop perl as a build dependency. #75

Closed
redserpent7 opened this issue Jun 5, 2016 · 8 comments
Closed

CMake issue: Drop perl as a build dependency. #75

redserpent7 opened this issue Jun 5, 2016 · 8 comments

Comments

@redserpent7
Copy link

Hi,
I am trying to build from the latest master using CMake 3.6.0 and Visual Studio 2015.
Whenever I try and configure CMake I get these two errors:

PERL_EXECUTABLE-NOTFOUND
POPT_INCLUDE_DIRS-NOTFOUND

How can I make it work?

@Salamek
Copy link
Member

Salamek commented Jun 5, 2016

Install perl and popt libs (http://gnuwin32.sourceforge.net/packages/popt.htm)
or you can use

cmake_dependent_option(BUILD_RDIFF "Whether or not to build rdiff executable" ON "POPT_FOUND" OFF)

if you want only lib

@Quiark
Copy link

Quiark commented Sep 25, 2016

I also had to add my own S_IFREG to the code because VS2015 doesn't have it:

#ifndef S_ISREG
#   define S_ISREG(x) (x & _S_IFREG)
#endif

and change librsync to static link otherwise VS won't create an import lib for it.

#  change to this in CMakeLists.txt
add_library(rsync STATIC ${rsync_LIB_SRCS})

Then the build went fine.

@sourcefrog
Copy link
Contributor

@Quiark it would be great if you could send clean PRs for those two changes.

@marius-nicolae
Copy link

Besides the issues described here I've also encountered another one, regarding usage of "_fileno" and "fileno" availability, while trying to build the library with MSVC 2015 and gcc on Linux 64 bits. I've also attached a patch to overcome them: librsync-patch.zip . What do you think about it?

On top, perl on Windows is pretty unusual, even for developers and, after checking the mkprototab.pl script, is seems its output is static. Taking these into consideration how about to generate the "prototab.h" and "prototab.c" offline, and add them as is, directly into the project?

@Salamek
Copy link
Member

Salamek commented May 1, 2017

@marius-nicolae ... we have github PR's for that...

Perl issue:
no, generated scripts should NOT be in repo, so only correct solution is switch everything directly to C or Python see #82 (or use modern OS 👻 )

@marius-nicolae
Copy link

I'm new with github and pull requests but I've managed to create one: #100 .

Regarding Perl thing, it's not referring to tests as the case of #82, but it's about "mkprototab.pl" script which gets called by cmake and statically creates two files, "prototab.h" and "prototab.c", used for building the rsync library.

PS. To keep this issue clean, would you like to create another specific one?

@dbaarda
Copy link
Member

dbaarda commented Jun 2, 2017

I think this is about trying to drop perl as a build dependency.

Personally I don't see much value in continuing to have prototab.[ch] auto-generated at all. They are pretty static and realistically if we want to add cmds like a whole-file checksum (see #9) it'd probably be easier to edit the *.[ch] files to add it than update the *.pl file. Dropping the perl build dependency would be more of a win than the auto-generation gives us.

@dbaarda dbaarda changed the title CMake issue CMake issue: Drop perl as a build dependency. Jun 2, 2017
@dbaarda
Copy link
Member

dbaarda commented Feb 27, 2018

Note pull request #142 removes perl as a build dependency, but perl will still be needed to run some of the tests because they use a mutate.pl script.

Given there is #82 about fixing the tests be more windows friendly, I'm going to consider #142 as fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants