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

Better custom compilation flags handling #717

Closed
artemp opened this issue Oct 11, 2011 · 5 comments
Closed

Better custom compilation flags handling #717

artemp opened this issue Oct 11, 2011 · 5 comments

Comments

@artemp
Copy link
Member

artemp commented Oct 11, 2011

Along side is a patch for custom cflags/ldflags handling.
Actually (without) it just doesn't take my flags in account (CUSTOM_CXX/LDFLAGS)

Also, it will modify the boost finder to search on those CFLAGS/LDFLAGS for custom directories.

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[kiorky] I ll post a new patch a soon as the compilation pass but when i set custom ldflags, it just fails with an undefined symbol. Strangely "src" isnt anymore in LIBPATH, so the patch i will post add src in the LDFLAGS explicitly

{{{
svg2png.cpp:(.text._ZN6mapnik3svg12svg_rendererINS0_12path_adapterINS0_18vertex_stl_adapterISt6vectorIN3agg11vertex_baseIdEESaIS7_EEEEEENS5_11pod_bvectorINS0_15path_attributesELj6EEEE6renderINS5_22rasterizer_scanline_aaINS5_18rasterizer_sl_clipINS5_12ras_conv_intEEEEENS5_11scanline_u8ENS5_13renderer_baseINS5_23pixfmt_alpha_blend_rgbaINS5_18blender_rgba_plainINS5_5rgba8ENS5_10order_rgbaEEENS5_13row_ptr_cacheIhEEjEEEEEEvRT_RT0_RT1_RKNS5_12trans_affineEdRKNS_5box2dIdEE[void mapnik::svg::svg_renderermapnik::svg::path_adapter<mapnik::svg::vertex_stl_adapter<std::vector<agg::vertex_base<double, std::allocatoragg::vertex_base > > >, agg::pod_bvector<mapnik::svg::path_attributes, 6u> >::renderagg::rasterizer_scanline_aa<agg::rasterizer_sl_clip<agg::ras_conv_int >, agg::scanline_u8, agg::renderer_base<agg::pixfmt_alpha_blend_rgba<agg::blender_rgba_plain<agg::rgba8, agg::order_rgba>, agg::row_ptr_cache, unsigned int> > >(agg::rasterizer_scanline_aaagg::rasterizer_sl_clip<agg::ras_conv_int >&, agg::scanline_u8&, agg::renderer_base<agg::pixfmt_alpha_blend_rgba<agg::blender_rgba_plain<agg::rgba8, agg::order_rgba>, agg::row_ptr_cache, unsigned int> >&, agg::trans_affine const&, double, mapnik::box2d const&)]+0x7aa): undefined reference to mapnik::gradient::get_gradient_type() const' svg2png.cpp:(.text._ZN6mapnik3svg12svg_rendererINS0_12path_adapterINS0_18vertex_stl_adapterISt6vectorIN3agg11vertex_baseIdEESaIS7_EEEEEENS5_11pod_bvectorINS0_15path_attributesELj6EEEE6renderINS5_22rasterizer_scanline_aaINS5_18rasterizer_sl_clipINS5_12ras_conv_intEEEEENS5_11scanline_u8ENS5_13renderer_baseINS5_23pixfmt_alpha_blend_rgbaINS5_18blender_rgba_plainINS5_5rgba8ENS5_10order_rgbaEEENS5_13row_ptr_cacheIhEEjEEEEEEvRT_RT0_RT1_RKNS5_12trans_affineEdRKNS_5box2dIdEE[void mapnik::svg::svg_renderer<mapnik::svg::path_adapter<mapnik::svg::vertex_stl_adapter<std::vector<agg::vertex_base<double>, std::allocator<agg::vertex_base<double> > > > >, agg::pod_bvector<mapnik::svg::path_attributes, 6u> >::render<agg::rasterizer_scanline_aa<agg::rasterizer_sl_clip<agg::ras_conv_int> >, agg::scanline_u8, agg::renderer_base<agg::pixfmt_alpha_blend_rgba<agg::blender_rgba_plain<agg::rgba8, agg::order_rgba>, agg::row_ptr_cache<unsigned char>, unsigned int> > >(agg::rasterizer_scanline_aa<agg::rasterizer_sl_clip<agg::ras_conv_int> >&, agg::scanline_u8&, agg::renderer_base<agg::pixfmt_alpha_blend_rgba<agg::blender_rgba_plain<agg::rgba8, agg::order_rgba>, agg::row_ptr_cache<unsigned char>, unsigned int> >&, agg::trans_affine const&, double, mapnik::box2d<double> const&)]+0xcda): undefined reference tomapnik::gradient::get_gradient_type() const
}}}

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[kiorky] Uhm, no the problem was more compicated, i compile mapnik for another project and the policy in to put things in say "prefix", and we have a tool that add "-L/prefix -Wl,-rpath -Wl,/prefix" in the environment.

Now, problem was i have a previous installed version of libmapnik in that /prefix and at compilation time "/prefix" took precedence on "src", so the upcoming patch i ll post take that in account.

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] thanks for the patch.

ya, your first problem sounds like a config issue not a mapnik/scons issue.

Overall CUSTOM_LD/CXX flags are set per target and not used globally. This surely is a problem if you try to use them to locate boost. BOOST_INCLUDES/BOOST_LIBS would be the recommended way to locate boost.

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[kiorky] The problem is there for other libraries than boost, just install something in a non standart place and cry.
It's cool to have custom cflags/ldflags taken in account rather to specify explicitly where the libraries are.

Useless to repeat that build tools (like mine) will set automaticly cflags & ldflags.
So my patch may be relevant.

@springmeyer
Copy link
Member

closing, not actionable.

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

2 participants